quarksstatefulset

package
v1.0.1320 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const ReconcileSkipDuration = 10 * time.Second

ReconcileSkipDuration is the duration of merging consecutive triggers.

Variables

This section is empty.

Functions

func AddQuarksStatefulSet

func AddQuarksStatefulSet(ctx context.Context, config *config.Config, mgr manager.Manager) error

AddQuarksStatefulSet creates a new QuarksStatefulSet controller to watch for the custom resource and reconcile it into statefulSets.

func AddQuarksStatefulSetStatus

func AddQuarksStatefulSetStatus(ctx context.Context, config *config.Config, mgr manager.Manager) error

AddQuarksStatefulSetStatus creates a new Status controller to update for quarks statefulset.

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

func KubeConfig() (*rest.Config, error)

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

func NewPodMutator(log *zap.SugaredLogger, config *config.Config) admission.Handler

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

func NewQuarksStatefulSetStatusReconciler

func NewQuarksStatefulSetStatusReconciler(ctx context.Context, config *config.Config, mgr manager.Manager) reconcile.Reconciler

NewQuarksStatefulSetStatusReconciler returns a new reconcile.Reconciler for QuarksStatefulSets Status

func NewReconciler

func NewReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, srf setReferenceFunc, store vss.VersionedSecretStore) reconcile.Reconciler

NewReconciler returns a new reconcile.Reconciler for QuarksStatefulSets

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 labels on the pod for service selectors

func (*PodMutator) InjectClient added in v0.0.3

func (m *PodMutator) InjectClient(c client.Client) error

InjectClient injects the client.

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 ReconcileQuarksStatefulSetStatus

type ReconcileQuarksStatefulSetStatus struct {
	// contains filtered or unexported fields
}

ReconcileQuarksStatefulSetStatus reconciles an QuarksStatefulSet object for its status

func (*ReconcileQuarksStatefulSetStatus) 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.

type ReconcileStatefulSetActivePassive

type ReconcileStatefulSetActivePassive struct {
	// contains filtered or unexported fields
}

ReconcileStatefulSetActivePassive reconciles an QuarksStatefulSet object when references change

func (*ReconcileStatefulSetActivePassive) Reconcile

Reconcile manages the active labels on pods that are part of a statefulset, that is managed by the QuarksStatefulSet under reconciliation. The active label is based on the success of running probeCmd inside a specific container. Note: Reconcile will always requeue on success after ActivePassiveProbe.PeriodSeconds have passed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL