Documentation ¶
Index ¶
- func CreateOnlyMutator(_, _ client.Object) (bool, error)
- func DeploymentAffinityMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentCommandMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentContainerListMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentEnvMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentImageMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentImagePullSecretsMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentLivenessProbeMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentPortsMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentReadinessProbeMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentReplicasMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentResourcesMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentVolumeMountsMutator(desired, existing *appsv1.Deployment) bool
- func DeploymentVolumesMutator(desired, existing *appsv1.Deployment) bool
- func PodDisruptionBudgetMutator(existingObj, desiredObj client.Object) (bool, error)
- func ServicePortsMutator(desired, existing *v1.Service) bool
- type BaseReconciler
- func (b *BaseReconciler) APIClientReader() client.Reader
- func (b *BaseReconciler) Client() client.Client
- func (b *BaseReconciler) CreateResource(ctx context.Context, obj client.Object) error
- func (b *BaseReconciler) DeleteResource(ctx context.Context, obj client.Object, options ...client.DeleteOption) error
- func (b *BaseReconciler) EnsureOwnerReference(owner, obj client.Object) (bool, error)
- func (b *BaseReconciler) EventRecorder() record.EventRecorder
- func (b *BaseReconciler) GetResource(ctx context.Context, objKey types.NamespacedName, obj client.Object) error
- func (b *BaseReconciler) Logger() logr.Logger
- func (b *BaseReconciler) Reconcile(context.Context, ctrl.Request) (ctrl.Result, error)
- func (b *BaseReconciler) ReconcileConfigMap(ctx context.Context, desired *corev1.ConfigMap, mutatefn MutateFn) error
- func (b *BaseReconciler) ReconcileDeployment(ctx context.Context, desired *appsv1.Deployment, mutatefn MutateFn) error
- func (b *BaseReconciler) ReconcilePersistentVolumeClaim(ctx context.Context, desired *corev1.PersistentVolumeClaim, mutatefn MutateFn) error
- func (b *BaseReconciler) ReconcilePodDisruptionBudget(ctx context.Context, desired *policyv1.PodDisruptionBudget, mutatefn MutateFn) error
- func (b *BaseReconciler) ReconcileResource(ctx context.Context, obj, desired client.Object, mutateFn MutateFn) error
- func (b *BaseReconciler) ReconcileService(ctx context.Context, desired *corev1.Service, mutatefn MutateFn) error
- func (b *BaseReconciler) Scheme() *runtime.Scheme
- func (b *BaseReconciler) SetOwnerReference(owner, obj client.Object) error
- func (b *BaseReconciler) UpdateResource(ctx context.Context, obj client.Object) error
- func (b *BaseReconciler) UpdateResourceStatus(ctx context.Context, obj client.Object) error
- type DeploymentMutateFn
- type MutateFn
- type ServiceMutateFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeploymentAffinityMutator ¶ added in v0.6.0
func DeploymentAffinityMutator(desired, existing *appsv1.Deployment) bool
func DeploymentCommandMutator ¶ added in v0.5.0
func DeploymentCommandMutator(desired, existing *appsv1.Deployment) bool
func DeploymentContainerListMutator ¶ added in v0.6.0
func DeploymentContainerListMutator(desired, existing *appsv1.Deployment) bool
func DeploymentEnvMutator ¶ added in v0.7.0
func DeploymentEnvMutator(desired, existing *appsv1.Deployment) bool
func DeploymentImageMutator ¶ added in v0.4.0
func DeploymentImageMutator(desired, existing *appsv1.Deployment) bool
func DeploymentImagePullSecretsMutator ¶ added in v0.11.0
func DeploymentImagePullSecretsMutator(desired, existing *appsv1.Deployment) bool
func DeploymentLivenessProbeMutator ¶ added in v0.8.0
func DeploymentLivenessProbeMutator(desired, existing *appsv1.Deployment) bool
func DeploymentPortsMutator ¶ added in v0.8.0
func DeploymentPortsMutator(desired, existing *appsv1.Deployment) bool
func DeploymentReadinessProbeMutator ¶ added in v0.8.0
func DeploymentReadinessProbeMutator(desired, existing *appsv1.Deployment) bool
func DeploymentReplicasMutator ¶ added in v0.4.0
func DeploymentReplicasMutator(desired, existing *appsv1.Deployment) bool
func DeploymentResourcesMutator ¶ added in v0.6.0
func DeploymentResourcesMutator(desired, existing *appsv1.Deployment) bool
func DeploymentVolumeMountsMutator ¶ added in v0.7.0
func DeploymentVolumeMountsMutator(desired, existing *appsv1.Deployment) bool
DeploymentVolumesMutator implements strict VolumeMounts reconcilliation Does not allow manually added volumeMounts
func DeploymentVolumesMutator ¶ added in v0.7.0
func DeploymentVolumesMutator(desired, existing *appsv1.Deployment) bool
DeploymentVolumesMutator implements strict Volumes reconcilliation Does not allow manually added volumes
func PodDisruptionBudgetMutator ¶ added in v0.6.0
func ServicePortsMutator ¶ added in v0.8.0
Types ¶
type BaseReconciler ¶
type BaseReconciler struct {
// contains filtered or unexported fields
}
func NewBaseReconciler ¶
func (*BaseReconciler) APIClientReader ¶
func (b *BaseReconciler) APIClientReader() client.Reader
APIClientReader return a client that directly reads objects from the Kubernetes APIServer
func (*BaseReconciler) Client ¶
func (b *BaseReconciler) Client() client.Client
Client returns a split client that reads objects from the cache and writes to the Kubernetes APIServer
func (*BaseReconciler) CreateResource ¶
func (*BaseReconciler) DeleteResource ¶
func (b *BaseReconciler) DeleteResource(ctx context.Context, obj client.Object, options ...client.DeleteOption) error
func (*BaseReconciler) EnsureOwnerReference ¶
func (b *BaseReconciler) EnsureOwnerReference(owner, obj client.Object) (bool, error)
EnsureOwnerReference sets owner as a Controller OwnerReference on owned returns boolean to notify when the object has been updated
func (*BaseReconciler) EventRecorder ¶
func (b *BaseReconciler) EventRecorder() record.EventRecorder
func (*BaseReconciler) GetResource ¶
func (b *BaseReconciler) GetResource(ctx context.Context, objKey types.NamespacedName, obj client.Object) error
func (*BaseReconciler) Logger ¶
func (b *BaseReconciler) Logger() logr.Logger
func (*BaseReconciler) ReconcileConfigMap ¶
func (*BaseReconciler) ReconcileDeployment ¶
func (b *BaseReconciler) ReconcileDeployment(ctx context.Context, desired *appsv1.Deployment, mutatefn MutateFn) error
func (*BaseReconciler) ReconcilePersistentVolumeClaim ¶ added in v0.7.0
func (b *BaseReconciler) ReconcilePersistentVolumeClaim(ctx context.Context, desired *corev1.PersistentVolumeClaim, mutatefn MutateFn) error
func (*BaseReconciler) ReconcilePodDisruptionBudget ¶ added in v0.6.0
func (b *BaseReconciler) ReconcilePodDisruptionBudget(ctx context.Context, desired *policyv1.PodDisruptionBudget, mutatefn MutateFn) error
func (*BaseReconciler) ReconcileResource ¶
func (b *BaseReconciler) ReconcileResource(ctx context.Context, obj, desired client.Object, 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) ReconcileService ¶
func (*BaseReconciler) Scheme ¶
func (b *BaseReconciler) Scheme() *runtime.Scheme
func (*BaseReconciler) SetOwnerReference ¶
func (b *BaseReconciler) SetOwnerReference(owner, obj client.Object) error
SetOwnerReference sets owner as a Controller OwnerReference on owned
func (*BaseReconciler) UpdateResource ¶
func (*BaseReconciler) UpdateResourceStatus ¶
type DeploymentMutateFn ¶ added in v0.4.0
type DeploymentMutateFn func(desired, existing *appsv1.Deployment) bool
DeploymentMutateFn is a function which mutates the existing Deployment into it's desired state.
type MutateFn ¶
MutateFn is a function which mutates the existing object into it's desired state.
func DeploymentMutator ¶ added in v0.4.0
func DeploymentMutator(opts ...DeploymentMutateFn) MutateFn
func ServiceMutator ¶ added in v0.8.0
func ServiceMutator(opts ...ServiceMutateFn) MutateFn
type ServiceMutateFn ¶ added in v0.8.0
ServiceMutateFn is a function which mutates the existing Service into it's desired state.