Back to godoc.org

Package statefulset

v0.0.2
Latest Go to latest

The latest major version is .

Published: Oct 7, 2020 | License: Apache-2.0 | Module: code.cloudfoundry.org/quarks-statefulset

Index

Variables

var (
	// AnnotationCanaryRolloutEnabled if set to "true" canary behaviour is desired
	AnnotationCanaryRolloutEnabled = fmt.Sprintf("%s/canary-rollout-enabled", apis.GroupName)
	// AnnotationCanaryRollout is the state of the canary rollout of the stateful set
	AnnotationCanaryRollout = fmt.Sprintf("%s/canary-rollout", apis.GroupName)
	// AnnotationCanaryWatchTime is the max time for the canary update
	AnnotationCanaryWatchTime = fmt.Sprintf("%s/canary-watch-time-ms", apis.GroupName)
	// AnnotationUpdateWatchTime is the max time for the complete update
	AnnotationUpdateWatchTime = fmt.Sprintf("%s/update-watch-time-ms", apis.GroupName)
	// AnnotationUpdateStartTime is the timestamp when the update started
	AnnotationUpdateStartTime = fmt.Sprintf("%s/update-start-time", apis.GroupName)
)

func AddStatefulSetRollout

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

AddStatefulSetRollout creates a new statefulset rollout controller and adds it to the manager. The purpose of this controller is to remove the partition of the statefulset if the canary succeeds.

func CheckUpdate

func CheckUpdate(e event.UpdateEvent) bool

CheckUpdate checks if update event should be processed

func CleanupNonReadyPod

func CleanupNonReadyPod(ctx context.Context, client crc.Client, statefulSet *appsv1.StatefulSet, index int32) error

CleanupNonReadyPod deletes all pods, that are not ready

func ConfigureStatefulSetForInitialRollout

func ConfigureStatefulSetForInitialRollout(statefulSet *appsv1.StatefulSet)

ConfigureStatefulSetForInitialRollout initially configures a stateful set for canarying and rollout

func ConfigureStatefulSetForRollout

func ConfigureStatefulSetForRollout(statefulSet *appsv1.StatefulSet)

ConfigureStatefulSetForRollout configures a stateful set for canarying and rollout

func NewMutator

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

NewMutator returns a new reconcile.Reconciler

func NewStatefulSetRolloutMutator

func NewStatefulSetRolloutMutator(log *zap.SugaredLogger, config *config.Config) *wh.OperatorWebhook

NewStatefulSetRolloutMutator creates a statefulset mutator for setting the partion

func NewStatefulSetRolloutReconciler

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

NewStatefulSetRolloutReconciler returns a new reconcile.Reconciler

type Mutator

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

Mutator changes statefulset definitions

func (*Mutator) Handle

func (m *Mutator) Handle(ctx context.Context, req admission.Request) admission.Response

Handle set the partion for StatefulSets

func (*Mutator) InjectDecoder

func (m *Mutator) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

type ReconcileStatefulSetRollout

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

ReconcileStatefulSetRollout reconciles an QuarksStatefulSet object when references changes

func (*ReconcileStatefulSetRollout) Reconcile

func (r *ReconcileStatefulSetRollout) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile cleans up old versions and volumeManagement statefulSet of the QuarksStatefulSet

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier