Documentation ¶
Index ¶
- Constants
- Variables
- func NewDropReplicaOptionsArr(opts ...*dropReplicaOptions) (res dropReplicaOptionsArr)
- func NewMigrateTableOptionsArr(opts ...*migrateTableOptions) (res migrateTableOptionsArr)
- func NewReconcileHostStatefulSetOptionsArr(opts ...*reconcileHostStatefulSetOptions) (res reconcileHostStatefulSetOptionsArr)
- type Announcer
- func (a Announcer) A() Announcer
- func (a Announcer) E() Announcer
- func (a Announcer) Error(format string, args ...interface{})
- func (a Announcer) F() Announcer
- func (a Announcer) FL() Announcer
- func (a Announcer) Fatal(format string, args ...interface{})
- func (a Announcer) Info(format string, args ...interface{})
- func (a Announcer) L() Announcer
- func (a Announcer) M(m ...interface{}) Announcer
- func (a Announcer) P()
- func (a Announcer) S() Announcer
- func (a Announcer) Silence() Announcer
- func (a Announcer) V(level log.Level) Announcer
- func (a Announcer) Warning(format string, args ...interface{})
- func (a Announcer) WithController(ctrl *Controller) Announcer
- func (a Announcer) WithEvent(chi *api.ClickHouseInstallation, action string, reason string) Announcer
- func (a Announcer) WithStatusAction(chi *api.ClickHouseInstallation) Announcer
- func (a Announcer) WithStatusActions(chi *api.ClickHouseInstallation) Announcer
- func (a Announcer) WithStatusError(chi *api.ClickHouseInstallation) Announcer
- type Controller
- func (c *Controller) EventError(chi *api.ClickHouseInstallation, action string, reason string, message string)
- func (c *Controller) EventInfo(chi *api.ClickHouseInstallation, action string, reason string, message string)
- func (c *Controller) EventWarning(chi *api.ClickHouseInstallation, action string, reason string, message string)
- func (c *Controller) GetCHIByObjectMeta(objectMeta *meta.ObjectMeta, isCHI bool) (*api.ClickHouseInstallation, error)
- func (c *Controller) Run(ctx context.Context)
- type DropDns
- type ErrorCRUD
- type ErrorDataPersistence
- type Metrics
- type PriorityQueueItem
- type ReconcileCHI
- type ReconcileCHIT
- type ReconcileChopConfig
- type ReconcileEndpoints
- type ReconcilePod
- type ReconcileShardsAndHostsOptions
- type ReconcileShardsAndHostsOptionsCtxKeyType
- type UpdateCHIStatusOptions
Constants ¶
const FinalizerName = "finalizer.clickhouseinstallation.altinity.com"
FinalizerName specifies name of the finalizer to be used with CHI
Variables ¶
var ( // ErrOperatorPodNotSpecified specifies error when there is not namespace/name pair provided pointing to operator pod ErrOperatorPodNotSpecified = fmt.Errorf("operator pod not specfied") )
Functions ¶
func NewDropReplicaOptionsArr ¶
func NewDropReplicaOptionsArr(opts ...*dropReplicaOptions) (res dropReplicaOptionsArr)
NewDropReplicaOptionsArr creates new dropReplicaOptions array
func NewMigrateTableOptionsArr ¶
func NewMigrateTableOptionsArr(opts ...*migrateTableOptions) (res migrateTableOptionsArr)
NewMigrateTableOptionsArr creates new migrateTableOptions array
func NewReconcileHostStatefulSetOptionsArr ¶
func NewReconcileHostStatefulSetOptionsArr(opts ...*reconcileHostStatefulSetOptions) (res reconcileHostStatefulSetOptionsArr)
NewReconcileHostStatefulSetOptionsArr creates new reconcileHostStatefulSetOptions array
Types ¶
type Announcer ¶
Announcer handler all log/event/status messages going outside of controller/worker
func (Announcer) WithController ¶
func (a Announcer) WithController(ctrl *Controller) Announcer
WithController specifies controller to be used in case `chi`-related announces need to be done
func (Announcer) WithEvent ¶
func (a Announcer) WithEvent( chi *api.ClickHouseInstallation, action string, reason string, ) Announcer
WithEvent is used in chained calls in order to produce event into `chi`
func (Announcer) WithStatusAction ¶
func (a Announcer) WithStatusAction(chi *api.ClickHouseInstallation) Announcer
WithStatusAction is used in chained calls in order to produce action into `ClickHouseInstallation.Status.Action`
func (Announcer) WithStatusActions ¶
func (a Announcer) WithStatusActions(chi *api.ClickHouseInstallation) Announcer
WithStatusActions is used in chained calls in order to produce action in ClickHouseInstallation.Status.Actions
func (Announcer) WithStatusError ¶
func (a Announcer) WithStatusError(chi *api.ClickHouseInstallation) Announcer
WithStatusError is used in chained calls in order to produce error in ClickHouseInstallation.Status.Error
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller defines CRO controller
func NewController ¶
func NewController( chopClient chopClientSet.Interface, extClient apiExtensions.Interface, kubeClient kube.Interface, chopInformerFactory chopInformers.SharedInformerFactory, kubeInformerFactory kubeInformers.SharedInformerFactory, ) *Controller
NewController creates instance of Controller
func (*Controller) EventError ¶
func (c *Controller) EventError( chi *api.ClickHouseInstallation, action string, reason string, message string, )
EventError emits event Error
func (*Controller) EventInfo ¶
func (c *Controller) EventInfo( chi *api.ClickHouseInstallation, action string, reason string, message string, )
EventInfo emits event Info
func (*Controller) EventWarning ¶
func (c *Controller) EventWarning( chi *api.ClickHouseInstallation, action string, reason string, message string, )
EventWarning emits event Warning
func (*Controller) GetCHIByObjectMeta ¶
func (c *Controller) GetCHIByObjectMeta(objectMeta *meta.ObjectMeta, isCHI bool) (*api.ClickHouseInstallation, error)
GetCHIByObjectMeta gets CHI by namespaced name
func (*Controller) Run ¶
func (c *Controller) Run(ctx context.Context)
Run syncs caches, starts workers
type DropDns ¶
type DropDns struct { PriorityQueueItem // contains filtered or unexported fields }
DropDns specifies drop dns queue item
func NewDropDns ¶
func NewDropDns(initiator *meta.ObjectMeta) *DropDns
NewDropDns creates new drop dns queue item
type ErrorDataPersistence ¶
type ErrorDataPersistence error
ErrorDataPersistence specifies errors of the PVCs and PVs
type Metrics ¶
type Metrics struct { // CHIReconcilesStarted is a number (counter) of started CHI reconciles CHIReconcilesStarted metric.Int64Counter // CHIReconcilesCompleted is a number (counter) of completed CHI reconciles. // In ideal world number of completed reconciles should be equal to CHIReconcilesStarted CHIReconcilesCompleted metric.Int64Counter // CHIReconcilesAborted is a number (counter) of explicitly aborted CHI reconciles. // This counter does not includes reconciles that we not completed due to external rasons, such as operator restart CHIReconcilesAborted metric.Int64Counter // CHIReconcilesTimings is a histogram of durations of successfully completed CHI reconciles CHIReconcilesTimings metric.Float64Histogram // HostReconcilesStarted is a number (counter) of started host reconciles HostReconcilesStarted metric.Int64Counter // HostReconcilesCompleted is a number (counter) of completed host reconciles. // In ideal world number of completed reconciles should be equal to HostReconcilesStarted HostReconcilesCompleted metric.Int64Counter // HostReconcilesRestarts is a number (counter) of host restarts during reconcile HostReconcilesRestarts metric.Int64Counter // HostReconcilesErrors is a number (counter) of failed (non-completed) host reconciles. HostReconcilesErrors metric.Int64Counter // HostReconcilesTimings is a histogram of durations of successfully completed host reconciles HostReconcilesTimings metric.Float64Histogram PodAddEvents metric.Int64Counter PodUpdateEvents metric.Int64Counter PodDeleteEvents metric.Int64Counter }
Metrics is a set of metrics that are tracked by the operator
type PriorityQueueItem ¶
type PriorityQueueItem struct {
// contains filtered or unexported fields
}
PriorityQueueItem specifies item of the priority queue
func (PriorityQueueItem) Priority ¶
func (i PriorityQueueItem) Priority() int
Priority gets priority of the queue item
type ReconcileCHI ¶
type ReconcileCHI struct { PriorityQueueItem // contains filtered or unexported fields }
ReconcileCHI specifies reconcile request queue item
func NewReconcileCHI ¶
func NewReconcileCHI(cmd string, old, new *api.ClickHouseInstallation) *ReconcileCHI
NewReconcileCHI creates new reconcile request queue item
func (ReconcileCHI) Handle ¶
func (r ReconcileCHI) Handle() queue.T
Handle returns handle of the queue item
type ReconcileCHIT ¶
type ReconcileCHIT struct { PriorityQueueItem // contains filtered or unexported fields }
ReconcileCHIT specifies reconcile CHI template queue item
func NewReconcileCHIT ¶
func NewReconcileCHIT(cmd string, old, new *api.ClickHouseInstallationTemplate) *ReconcileCHIT
NewReconcileCHIT creates new reconcile CHI template queue item
func (ReconcileCHIT) Handle ¶
func (r ReconcileCHIT) Handle() queue.T
Handle returns handle of the queue item
type ReconcileChopConfig ¶
type ReconcileChopConfig struct { PriorityQueueItem // contains filtered or unexported fields }
ReconcileChopConfig specifies CHOp config queue item
func NewReconcileChopConfig ¶
func NewReconcileChopConfig(cmd string, old, new *api.ClickHouseOperatorConfiguration) *ReconcileChopConfig
NewReconcileChopConfig creates new CHOp config queue item
func (ReconcileChopConfig) Handle ¶
func (r ReconcileChopConfig) Handle() queue.T
Handle returns handle of the queue item
type ReconcileEndpoints ¶
type ReconcileEndpoints struct { PriorityQueueItem // contains filtered or unexported fields }
ReconcileEndpoints specifies endpoint
func NewReconcileEndpoints ¶
func NewReconcileEndpoints(cmd string, old, new *core.Endpoints) *ReconcileEndpoints
NewReconcileEndpoints creates new reconcile endpoints queue item
func (ReconcileEndpoints) Handle ¶
func (r ReconcileEndpoints) Handle() queue.T
Handle returns handle of the queue item
type ReconcilePod ¶
type ReconcilePod struct { PriorityQueueItem // contains filtered or unexported fields }
ReconcilePod specifies pod reconcile
func NewReconcilePod ¶
func NewReconcilePod(cmd string, old, new *core.Pod) *ReconcilePod
NewReconcilePod creates new reconcile endpoints queue item
func (ReconcilePod) Handle ¶
func (r ReconcilePod) Handle() queue.T
Handle returns handle of the queue item
type ReconcileShardsAndHostsOptions ¶
type ReconcileShardsAndHostsOptions struct {
// contains filtered or unexported fields
}
ReconcileShardsAndHostsOptions is and options for reconciler
func (*ReconcileShardsAndHostsOptions) FullFanOut ¶
func (o *ReconcileShardsAndHostsOptions) FullFanOut() bool
FullFanOut gets value
type ReconcileShardsAndHostsOptionsCtxKeyType ¶
type ReconcileShardsAndHostsOptionsCtxKeyType string
ReconcileShardsAndHostsOptionsCtxKeyType specifies type for ReconcileShardsAndHostsOptionsCtxKey More details here on why do we need special type https://stackoverflow.com/questions/40891345/fix-should-not-use-basic-type-string-as-key-in-context-withvalue-golint
const ReconcileShardsAndHostsOptionsCtxKey ReconcileShardsAndHostsOptionsCtxKeyType = "ReconcileShardsAndHostsOptions"
ReconcileShardsAndHostsOptionsCtxKey specifies name of the key to be used for ReconcileShardsAndHostsOptions
type UpdateCHIStatusOptions ¶
type UpdateCHIStatusOptions struct { api.CopyCHIStatusOptions TolerateAbsence bool }
UpdateCHIStatusOptions defines how to update CHI status