reconcilers

package
v2.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ReconcilePolicyManage instructs the operator to manage the resource in question.
	// This includes issuing PUTs to update it and DELETE's to delete it from Azure if deleted in Kuberentes.
	// This is the default policy when no policy is specified.
	ReconcilePolicyManage = ReconcilePolicy("manage")

	// ReconcilePolicySkip instructs the operator to skip all reconciliation actions. This includes creating
	// the resource.
	ReconcilePolicySkip = ReconcilePolicy("skip")

	// ReconcilePolicyDetachOnDelete instructs the operator to skip deletion of resources in Azure. This allows
	// deletion of the resource in Kubernetes to go through but does not delete the underlying Azure resource.
	ReconcilePolicyDetachOnDelete = ReconcilePolicy("detach-on-delete")
)
View Source
const PerResourceSecretAnnotation = "serviceoperator.azure.com/credential-from"
View Source
const ReconcilePolicyAnnotation = "serviceoperator.azure.com/reconcile-policy"

ReconcilePolicyAnnotation describes the reconcile policy for the resource in question. A reconcile policy describes what action (if any) the operator is allowed to take when reconciling the resource. If no reconcile policy is specified, the default is "run"

Variables

This section is empty.

Functions

func ARMPerResourceSecretAnnotationChangedPredicate

func ARMPerResourceSecretAnnotationChangedPredicate(log logr.Logger) predicate.Predicate

ARMPerResourceSecretAnnotationChangedPredicate creates a predicate that emits events when annotations interesting to the generic ARM reconciler are changed

func ARMReconcilerAnnotationChangedPredicate

func ARMReconcilerAnnotationChangedPredicate(log logr.Logger) predicate.Predicate

ARMReconcilerAnnotationChangedPredicate creates a predicate that emits events when annotations interesting to the generic ARM reconciler are changed

func ClassifyResolverError

func ClassifyResolverError(err error) error

func HasAnnotationChanged

func HasAnnotationChanged(old *string, new *string) bool

HasAnnotationChanged returns true if the annotation has changed

func HasReconcilePolicyAnnotationChanged

func HasReconcilePolicyAnnotationChanged(old *string, new *string) bool

HasReconcilePolicyAnnotationChanged returns true if the reconcile-policy annotation has changed in a way that needs to trigger a reconcile.

func LogObj

func LogObj(log logr.Logger, level int, note string, obj genruntime.MetaObject)

LogObj logs the obj

Types

type ARMOwnedResourceReconcilerCommon

type ARMOwnedResourceReconcilerCommon struct {
	ReconcilerCommon
	ResourceResolver *resolver.Resolver
}

func (*ARMOwnedResourceReconcilerCommon) ApplyOwnership

func (*ARMOwnedResourceReconcilerCommon) ClaimResource

ClaimResource ensures that the owner reference is set

func (*ARMOwnedResourceReconcilerCommon) NeedsToWaitForOwner

NeedsToWaitForOwner returns false if the owner doesn't need to be waited for, and true if it does.

type ActionFunc

type ActionFunc = func(ctx context.Context) (ctrl.Result, error)

TODO: It's not clear to me that this file holds any value...

type ReconcilePolicy

type ReconcilePolicy string

func GetReconcilePolicy

func GetReconcilePolicy(obj genruntime.MetaObject, log logr.Logger) ReconcilePolicy

GetReconcilePolicy gets the reconcile-policy from the ReconcilePolicyAnnotation

func ParseReconcilePolicy

func ParseReconcilePolicy(policy string) (ReconcilePolicy, error)

ParseReconcilePolicy parses the provided reconcile policy.

func (ReconcilePolicy) AllowsDelete

func (r ReconcilePolicy) AllowsDelete() bool

AllowsDelete determines if the policy allows deletion of the backing Azure resource

func (ReconcilePolicy) AllowsModify

func (r ReconcilePolicy) AllowsModify() bool

AllowsModify determines if the policy allows modification of the backing Azure resource

type ReconcilerCommon

type ReconcilerCommon struct {
	KubeClient         kubeclient.Client
	PositiveConditions *conditions.PositiveConditionBuilder
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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