provision

package
v0.0.0-...-9b96d08 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultObservationInterval = 10 * time.Second
	DefaultRequestTimeout      = 1 * time.Minute
)

Variables

This section is empty.

Functions

func GenericEventHandler

func GenericEventHandler() handler.EventHandler

GenericEventHandler returns an EventHandler that enqueues a reconciliation request from the generic event NamespacedName.

Types

type Provision

type Provision struct {
	Workload      *cachev1alpha1.Workload
	CTX           context.Context
	Client        k8s.Client
	Recorder      record.EventRecorder
	Log           logr.Logger
	Labels        map[string]string
	Monitor       *prometheus.GenericClientset
	Scheme        *runtime.Scheme
	ExpectSts     *appsv1.StatefulSet
	ActualSts     *appsv1.StatefulSet
	Observers     *observer.Manager
	ZKClient      *zk.BaseClient
	ObservedState *observer.State
	Finalizers    finalizer.Handler
}

func (*Provision) FinalizersFor

func (p *Provision) FinalizersFor(
	zk *cachev1alpha1.Workload,
) []finalizer.Finalizer

func (*Provision) Observer

func (p *Provision) Observer() error

func (*Provision) ProvisionConfigMap

func (p *Provision) ProvisionConfigMap() error

func (*Provision) ProvisionMonitor

func (p *Provision) ProvisionMonitor() error

func (*Provision) ProvisionService

func (p *Provision) ProvisionService() error

EnsureService makes sure the mongodb statefulset exists

func (*Provision) ProvisionStatefulset

func (p *Provision) ProvisionStatefulset() error

func (*Provision) Reconcile

func (p *Provision) Reconcile() error

type ResourcesState

type ResourcesState struct {
	// AllPods are all the pods related to the cluster, including ones with a
	// DeletionTimestamp tombstone set.
	AllPods []corev1.Pod
	// CurrentPods are all non-deleted pods.
	CurrentPods []corev1.Pod
	// CurrentPodsByPhase are all non-deleted indexed by their PodPhase
	CurrentPodsByPhase map[corev1.PodPhase][]corev1.Pod
	// DeletingPods are all deleted pods.
	DeletingPods []corev1.Pod
}

ResourcesState contains information about a deployments resources.

Jump to

Keyboard shortcuts

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