Documentation
¶
Index ¶
- Variables
- func GetHNCNamespace() string
- func IsManagedAnnotation(k string) bool
- func IsManagedLabel(k string) bool
- func IsManagedNamespace(nm string) bool
- func NewClient(readOnly bool) cluster.NewClientFunc
- func SetHNCNamespace(ns string)
- func SetManagedMeta(labels, annots []string) error
- func SetNamespaces(regex string, excluded ...string)
- func ValidateManagedAnnotations(annotations []api.MetaKVP) field.ErrorList
- func ValidateManagedLabels(labels []api.MetaKVP) field.ErrorList
- func WhyUnmanaged(nm string) string
- type NoPropagationLabel
Constants ¶
This section is empty.
Variables ¶
var NoPropagationLabels []NoPropagationLabel
NoPropagationLabels is a configuration slice that contains all NoPropagationLabel labels that should cause objects to be ignored from propagation.
var UnpropagatedAnnotations []string
UnpropgatedAnnotations is a list of annotations on objects that should _not_ be propagated by HNC. Much like HNC itself, other systems (such as GKE Config Sync) use annotations to "claim" an object - such as deleting objects it doesn't recognize. By removing these annotations on propgated objects, HNC ensures that other systems won't attempt to claim the same object.
This value is controlled by the --unpropagated-annotation command line, which may be set multiple times.
var UnpropagatedLabels []string
UnpropgatedLabels is a list of labels on objects that should _not_ be propagated by HNC. Much like HNC itself, other systems (such as ArgoCD) use labels to "claim" an object - such as deleting objects it doesn't recognize. By removing these labels on propgated objects, HNC ensures that other systems won't attempt to claim the same object.
This value is controlled by the --unpropagated-label command line, which may be set multiple times.
Functions ¶
func GetHNCNamespace ¶
func GetHNCNamespace() string
GetHNCNamespace return the namespace where hnc-manager and hnc resources deployed
func IsManagedAnnotation ¶
func IsManagedLabel ¶
func IsManagedNamespace ¶
IsManagedNamespace is the same as WhyUnmanaged but converts the response to a bool for convenience.
func NewClient ¶
func NewClient(readOnly bool) cluster.NewClientFunc
func SetHNCNamespace ¶
func SetHNCNamespace(ns string)
func SetManagedMeta ¶
SetManagedMeta sets the regexes for the managed namespace labels and annotations. The function ensures that all strings are valid regexes, and that they do not attempt to select for HNC metadata.
func SetNamespaces ¶
func WhyUnmanaged ¶
WhyUnamanged returns a human-readable message explaining why the given namespace is unmanaged, or an empty string if it *is* managed.
Types ¶
type NoPropagationLabel ¶
NoPropagationLabel specifies a label Key and Value which will cause an object to be excluded from propagation if the object defines that label with this specific value.