quarksstatefulset

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2019 License: Apache-2.0 Imports: 46 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"
)

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 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 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 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

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.

Source Files

  • active_passive_controller.go
  • active_passive_reconciler.go
  • pod_mutator.go
  • pod_webhook.go
  • quarksstatefulset_controller.go
  • quarksstatefulset_reconciler.go
  • util.go

Jump to

Keyboard shortcuts

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