Documentation ¶
Index ¶
- Constants
- func AddQuarksStatefulSet(ctx context.Context, config *config.Config, mgr manager.Manager) error
- func AddStatefulSetActivePassive(ctx context.Context, config *config.Config, mgr manager.Manager) error
- func GetMaxStatefulSetVersion(ctx context.Context, client crc.Client, ...) (*appsv1.StatefulSet, int, error)
- func KubeConfig() (*rest.Config, error)
- func NewActivePassiveReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, ...) reconcile.Reconciler
- func NewPodMutator(log *zap.SugaredLogger, config *config.Config) admission.Handler
- func NewQuarksStatefulSetPodMutator(log *zap.SugaredLogger, config *config.Config) *wh.OperatorWebhook
- func NewReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, ...) reconcile.Reconciler
- type PodMutator
- type ReconcileQuarksStatefulSet
- type ReconcileStatefulSetActivePassive
Constants ¶
const ( // EnvKubeAz is set by available zone name EnvKubeAz = "KUBE_AZ" // EnvBoshAz is set by available zone name EnvBoshAz = "BOSH_AZ" // EnvReplicas describes the number of replicas in the QuarksStatefulSet EnvReplicas = "REPLICAS" // EnvCfOperatorAz is set by available zone name EnvCfOperatorAz = "CF_OPERATOR_AZ" // EnvCFOperatorAZIndex is set by available zone index EnvCFOperatorAZIndex = "AZ_INDEX" )
Variables ¶
This section is empty.
Functions ¶
func AddQuarksStatefulSet ¶
AddQuarksStatefulSet creates a new QuarksStatefulSet controller to watch for the custom resource and reconcile it into statefulSets.
func AddStatefulSetActivePassive ¶
func AddStatefulSetActivePassive(ctx context.Context, config *config.Config, mgr manager.Manager) error
AddStatefulSetActivePassive creates a new QuarksStatefulSet controller that watches multiple instances of a specific resource, and decides which is active and which is passive
func GetMaxStatefulSetVersion ¶
func GetMaxStatefulSetVersion(ctx context.Context, client crc.Client, qStatefulSet *qstsv1a1.QuarksStatefulSet) (*appsv1.StatefulSet, int, error)
GetMaxStatefulSetVersion returns the max version statefulSet of the quarksStatefulSet.
func KubeConfig ¶
KubeConfig returns a kube config for this environment
func NewActivePassiveReconciler ¶
func NewActivePassiveReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, kclient kubernetes.Interface) reconcile.Reconciler
NewActivePassiveReconciler returns a new reconcile.Reconciler for the active/passive controller
func NewPodMutator ¶
NewPodMutator returns a pod mutator to add pod-ordinal on statefulset pods
func NewQuarksStatefulSetPodMutator ¶
func NewQuarksStatefulSetPodMutator(log *zap.SugaredLogger, config *config.Config) *wh.OperatorWebhook
NewQuarksStatefulSetPodMutator creates a quarksStatefulSet pod mutator for managing volumes
Types ¶
type PodMutator ¶
type PodMutator struct {
// contains filtered or unexported fields
}
PodMutator for adding the pod-ordinal label on statefulset pods
func (*PodMutator) Handle ¶
Handle checks if pod is part of a statefulset and adds the pod-ordinal label on the pod
func (*PodMutator) InjectDecoder ¶
func (m *PodMutator) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
type ReconcileQuarksStatefulSet ¶
type ReconcileQuarksStatefulSet struct {
// contains filtered or unexported fields
}
ReconcileQuarksStatefulSet reconciles an QuarksStatefulSet object
func (*ReconcileQuarksStatefulSet) Reconcile ¶
Reconcile reads that state of the cluster for a QuarksStatefulSet object and makes changes based on the state read and what is in the QuarksStatefulSet.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
func (*ReconcileQuarksStatefulSet) UpdateVersions ¶
func (r *ReconcileQuarksStatefulSet) UpdateVersions(ctx context.Context, qStatefulSet *qstsv1a1.QuarksStatefulSet) error
UpdateVersions updates the versions of all versioned secret mounted as volumes in QuarksStatefulSet
type ReconcileStatefulSetActivePassive ¶
type ReconcileStatefulSetActivePassive struct {
// contains filtered or unexported fields
}
ReconcileStatefulSetActivePassive reconciles an QuarksStatefulSet object when references change
func (*ReconcileStatefulSetActivePassive) Reconcile ¶
func (r *ReconcileStatefulSetActivePassive) Reconcile(request reconcile.Request) (reconcile.Result, error)
Reconcile reads the state of the cluster for a QuarksStatefulSet object and makes changes based on the state read and what is in the QuarksStatefulSet.Spec Note: The Reconcile Loop will always requeue the request stop before under completition. For this specific loop, the requeue will happen after the ActivePassiveProbe PeriodSeconds is reached.