Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CassandraReconciler ¶
type CassandraReconciler struct {
// contains filtered or unexported fields
}
CassandraReconciler is a controller that reconciles Cassandra resources
func NewReconciler ¶
func NewReconciler(clusters map[types.NamespacedName]*v1alpha1.Cassandra, client client.Client, eventRecorder record.EventRecorder, eventReceiver event.Receiver, operatorConfig *Config, metricsReporter metrics.ClusterMetricsReporter) *CassandraReconciler
NewReconciler creates a CassandraReconciler
func (*CassandraReconciler) Reconcile ¶
Reconcile implements reconcile.Reconciler Reconciliation for all watched resources is attempted in a single pass. Each request compares the current to the desired state and determines what has changed for each watched resource. Changes are calculated in one go for all watched resources so that the delta is calculated at a given point in time (as much as possible). Changes are applied one at a time without stopping on error to try bringing the cluster to the desired state as much as possible. Applying changes synchronously for a cluster while allowing concurrent updates for different clusters is made possible because the controller internal queue prevents concurrent updates for the same resource name - see https://github.com/kubernetes-sigs/controller-runtime/issues/616
type Config ¶
type Config struct { MetricPollInterval time.Duration MetricRequestDuration time.Duration ControllerSyncPeriod time.Duration Namespace string Version string RepositoryPath string }
The Config for the Operator
type Interrupter ¶
type Interrupter struct {
// contains filtered or unexported fields
}
Interrupter is a controller whose sole purpose is to check whether any subsequent changes have been made to a cluster which is currently under modification by the Reconciler, and interrupt the Reconciler so that the newer changes can be effected.
It works by using a map of channels, keyed on a namespace-qualified cluster names, which is shared with the polling loop which waits for stateful set provisioning to complete. When the interrupter closes the channel for a cluster, the polling loop will exit early with a return value that specifies the polling was interrupted, rather than having completed successfully.
func NewInterrupter ¶
func NewInterrupter(activeReconciliations *sync.Map, client client.Client, recorder record.EventRecorder) *Interrupter
NewInterrupter creates a new Interrupter