Documentation
¶
Index ¶
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 Kubernetes. // This is the default policy when no policy is specified. ReconcilePolicyManage = ReconcilePolicyValue("manage") // ReconcilePolicySkip instructs the operator to skip all reconciliation actions. This includes creating // the resource. ReconcilePolicySkip = ReconcilePolicyValue("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 = ReconcilePolicyValue("detach-on-delete") )
const AzureNameFromConfig = "serviceoperator.azure.com/azure-name-from-config"
AzureNameFromConfig is used to store the resolved Azure name from a ConfigMap for resources which support resolving their Azure name from a ConfigMap.
const PerResourceSecret = "serviceoperator.azure.com/credential-from"
const ReconcilePolicy = "serviceoperator.azure.com/reconcile-policy"
ReconcilePolicy 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 "manage"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReconcilePolicyValue ¶
type ReconcilePolicyValue string
func ParseReconcilePolicy ¶ added in v2.21.0
func ParseReconcilePolicy( policy string, defaultReconcilePolicy ReconcilePolicyValue, ) (ReconcilePolicyValue, error)
ParseReconcilePolicy parses provided reconcile policy, will fallback if the value is missing.
func (ReconcilePolicyValue) AllowsDelete ¶
func (r ReconcilePolicyValue) AllowsDelete() bool
AllowsDelete determines if the policy allows deletion of the backing Azure resource
func (ReconcilePolicyValue) AllowsModify ¶
func (r ReconcilePolicyValue) AllowsModify() bool
AllowsModify determines if the policy allows modification of the backing Azure resource
type ResolvedReconcilePolicies ¶ added in v2.21.0
type ResolvedReconcilePolicies struct {
// Effective is the policy for the resource being reconciled, resolved from its own annotation, Namespace,
// and Global.
Effective ReconcilePolicyValue
// NamespacePolicy is the policy for resources in this namespace carrying no annotation of their own, resolved
// from the namespace annotation or Global.
NamespacePolicy ReconcilePolicyValue
// NamespaceName is the namespace from which NamespacePolicy was resolved.
NamespaceName string
// Global is the policy resolved from the operator configuration or the built-in default. An unusable
// annotation falls back to this policy.
Global ReconcilePolicyValue
}
ResolvedReconcilePolicies are the resolved reconcile policies in effect during a reconcile. Read them with Effective or ForResource() rather than combining them.
func (ResolvedReconcilePolicies) ForResource ¶ added in v2.21.0
func (r ResolvedReconcilePolicies) ForResource(resource metav1.Object) (ReconcilePolicyValue, error)
ForResource returns the reconcile policy for a resource other than the one being reconciled. The resource must be in NamespaceName because Namespace was resolved specifically for that namespace.