config

package
v1.1.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

Functions

func GetHNCNamespace added in v1.1.0

func GetHNCNamespace() string

GetHNCNamespace return the namespace where hnc-manager and hnc resources deployed

func IsManagedAnnotation added in v1.0.0

func IsManagedAnnotation(k string) bool

func IsManagedLabel added in v1.0.0

func IsManagedLabel(k string) bool

func IsManagedNamespace

func IsManagedNamespace(nm string) bool

IsManagedNamespace is the same as WhyUnmanaged but converts the response to a bool for convenience.

func NewClient added in v1.1.0

func NewClient(readOnly bool) cluster.NewClientFunc

func SetHNCNamespace added in v1.1.0

func SetHNCNamespace(ns string)

func SetManagedMeta added in v1.0.0

func SetManagedMeta(labels, annots []string) error

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 SetNamespaces(regex string, excluded ...string)

func ValidateManagedAnnotations added in v1.0.0

func ValidateManagedAnnotations(annotations []api.MetaKVP) field.ErrorList

func ValidateManagedLabels added in v1.0.0

func ValidateManagedLabels(labels []api.MetaKVP) field.ErrorList

func WhyUnmanaged

func WhyUnmanaged(nm string) string

WhyUnamanged returns a human-readable message explaining why the given namespace is unmanaged, or an empty string if it *is* managed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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