Documentation ¶
Index ¶
- Constants
- func ARMPerResourceSecretAnnotationChangedPredicate(log logr.Logger) predicate.Predicate
- func ARMReconcilerAnnotationChangedPredicate(log logr.Logger) predicate.Predicate
- func ClassifyResolverError(err error) error
- func HasAnnotationChanged(old *string, new *string) bool
- func HasReconcilePolicyAnnotationChanged(old *string, new *string) bool
- func LogObj(log logr.Logger, level int, note string, obj genruntime.MetaObject)
- type ARMOwnedResourceReconcilerCommon
- func (r *ARMOwnedResourceReconcilerCommon) ApplyOwnership(ctx context.Context, log logr.Logger, obj genruntime.ARMOwnedMetaObject) error
- func (r *ARMOwnedResourceReconcilerCommon) ClaimResource(ctx context.Context, log logr.Logger, obj genruntime.ARMOwnedMetaObject) error
- func (r *ARMOwnedResourceReconcilerCommon) NeedsToWaitForOwner(ctx context.Context, log logr.Logger, obj genruntime.ARMOwnedMetaObject) (bool, error)
- type ActionFunc
- type ReconcilePolicy
- type ReconcilerCommon
Constants ¶
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") )
const PerResourceSecretAnnotation = "serviceoperator.azure.com/credential-from"
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 ¶
ARMPerResourceSecretAnnotationChangedPredicate creates a predicate that emits events when annotations interesting to the generic ARM reconciler are changed
func ARMReconcilerAnnotationChangedPredicate ¶
ARMReconcilerAnnotationChangedPredicate creates a predicate that emits events when annotations interesting to the generic ARM reconciler are changed
func ClassifyResolverError ¶
func HasAnnotationChanged ¶
HasAnnotationChanged returns true if the annotation has changed
func HasReconcilePolicyAnnotationChanged ¶
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 (r *ARMOwnedResourceReconcilerCommon) ApplyOwnership(ctx context.Context, log logr.Logger, obj genruntime.ARMOwnedMetaObject) error
func (*ARMOwnedResourceReconcilerCommon) ClaimResource ¶
func (r *ARMOwnedResourceReconcilerCommon) ClaimResource(ctx context.Context, log logr.Logger, obj genruntime.ARMOwnedMetaObject) error
ClaimResource ensures that the owner reference is set
func (*ARMOwnedResourceReconcilerCommon) NeedsToWaitForOwner ¶
func (r *ARMOwnedResourceReconcilerCommon) NeedsToWaitForOwner(ctx context.Context, log logr.Logger, obj genruntime.ARMOwnedMetaObject) (bool, error)
NeedsToWaitForOwner returns false if the owner doesn't need to be waited for, and true if it does.
type ActionFunc ¶
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 }