reconcilers

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOnlyMutator

func CreateOnlyMutator(existing, desired k8sutils.KubernetesObject) (bool, error)

func DeploymentEnvVarsMutator added in v0.6.0

func DeploymentEnvVarsMutator(desired, existing *appsv1.Deployment) bool

func DeploymentImageMutator added in v0.6.0

func DeploymentImageMutator(desired, existing *appsv1.Deployment) bool

func DeploymentPodTemplateAnnotationsMutator added in v0.6.0

func DeploymentPodTemplateAnnotationsMutator(desired, existing *appsv1.Deployment) bool

func DeploymentPortsMutator added in v0.6.0

func DeploymentPortsMutator(desired, existing *appsv1.Deployment) bool

func DeploymentReplicasMutator added in v0.6.0

func DeploymentReplicasMutator(desired, existing *appsv1.Deployment) bool

func DeploymentResourceMutator added in v0.6.0

func DeploymentResourceMutator(desired, existing *appsv1.Deployment) bool

func DeploymentServiceAccountNameMutator added in v0.6.0

func DeploymentServiceAccountNameMutator(desired, existing *appsv1.Deployment) bool

func DeploymentTemplateLabelsMutator added in v0.6.0

func DeploymentTemplateLabelsMutator(desired, existing *appsv1.Deployment) bool

func DeploymentVolumeMountsMutator added in v0.6.0

func DeploymentVolumeMountsMutator(desired, existing *appsv1.Deployment) bool

func DeploymentVolumesMutator added in v0.6.0

func DeploymentVolumesMutator(desired, existing *appsv1.Deployment) bool

func HpaCR added in v0.9.0

func IngressMutator added in v0.6.0

func IngressMutator(existingObj, desiredObj k8sutils.KubernetesObject) (bool, error)

func ReconcileEnvVar

func ReconcileEnvVar(existing *[]v1.EnvVar, desired []v1.EnvVar) bool

ReconcileEnvVar reconciles environment var lists

func ServicePortMutator added in v0.5.1

func ServicePortMutator(desired, existing *v1.Service) bool

func ServiceSelectorMutator added in v0.7.1

func ServiceSelectorMutator(desired, existing *v1.Service) bool

Types

type BaseControllerReconciler

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

func NewBaseControllerReconciler

func NewBaseControllerReconciler(client client.Client, apiClientReader client.Reader, scheme *runtime.Scheme) BaseControllerReconciler

func (*BaseControllerReconciler) APIClientReader added in v0.4.0

func (r *BaseControllerReconciler) APIClientReader() client.Reader

func (*BaseControllerReconciler) Client added in v0.4.0

func (*BaseControllerReconciler) Reconcile

func (*BaseControllerReconciler) Scheme added in v0.4.0

type BaseReconciler

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

func NewBaseReconciler

func NewBaseReconciler(client client.Client, apiClientReader client.Reader, scheme *runtime.Scheme, logger logr.Logger) BaseReconciler

func (*BaseReconciler) APIClientReader

func (b *BaseReconciler) APIClientReader() client.Reader

func (*BaseReconciler) Client

func (b *BaseReconciler) Client() client.Client

func (*BaseReconciler) Logger

func (b *BaseReconciler) Logger() logr.Logger

func (*BaseReconciler) ReconcileResource

func (b *BaseReconciler) ReconcileResource(ctx context.Context, obj, desired k8sutils.KubernetesObject, mutateFn MutateFn) error

ReconcileResource attempts to mutate the existing state in order to match the desired state. The object's desired state must be reconciled with the existing state inside the passed in callback MutateFn.

obj: Object of the same type as the 'desired' object.

Used to read the resource from the kubernetes cluster.
Could be zero-valued initialized object.

desired: Object representing the desired state

It returns an error.

func (*BaseReconciler) Scheme

func (b *BaseReconciler) Scheme() *runtime.Scheme

type DeploymentMutateFn added in v0.6.0

type DeploymentMutateFn func(desired, existing *appsv1.Deployment) bool

DeploymentMutateFn is a function which mutates the existing Deployment into it's desired state.

type HpaMutateFn added in v0.9.0

type HpaMutateFn func(desired, existing *hpa.HorizontalPodAutoscaler) bool

HpaMutateFn is a function which mutates the existing Hpa into it's desired state.

type MutateFn

type MutateFn func(existing, desired k8sutils.KubernetesObject) (bool, error)

MutateFn is a function which mutates the existing object into it's desired state.

func DeploymentMutator added in v0.6.0

func DeploymentMutator(opts ...DeploymentMutateFn) MutateFn

func HpaCreateOnlyMutator added in v0.9.0

func HpaCreateOnlyMutator() MutateFn

func HpaDeleteMutator added in v0.9.0

func HpaDeleteMutator() MutateFn

func ServiceMutator added in v0.7.1

func ServiceMutator(opts ...ServiceMutateFn) MutateFn

type ServiceMutateFn added in v0.7.1

type ServiceMutateFn func(desired, existing *v1.Service) bool

ServiceMutateFn is a function which mutates the existing Service into it's desired state.

Jump to

Keyboard shortcuts

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