Documentation
¶
Overview ¶
Package annotations holds the logic for examining and extracting information from annotations. This includes functionality such as:
- Namespace parsing and fetching
- Ownerhship considerations
- And the general constant strings for annotations
Index ¶
Constants ¶
View Source
const ( // Prefix is the prefix for annotations Prefix = "reflector.havulv.io" // ReflectAnnotation is the annotation used to determine if // the secret should be reflected or not ReflectAnnotation = Prefix + "/reflect" // NamespaceAnnotation is the annotation which determines which // namespaces to reflect to NamespaceAnnotation = Prefix + "/namespaces" // ReflectedFromAnnotation indicates what the originating namespace of the secret was ReflectedFromAnnotation = Prefix + "/reflected-from" // ReflectedAtAnnotation indicates when the annotation was originally reflected ReflectedAtAnnotation = Prefix + "/reflected-at" // ReflectionHashAnnotation is a hash of the reflected secret for quick comparison ReflectionHashAnnotation = Prefix + "/hash" // ReflectionOwnerAnnotation denotes that the reflected secret is owned by the reflector // and can be created or deleted at will or that it is owned by some other entity ReflectionOwnerAnnotation = Prefix + "/owner" // ReflectionOwned is the key to determine if a secret is owned by any reflector ReflectionOwned = "reflector" )
Variables ¶
View Source
var ( // ErrorNoNamespace is used when no namespaces are supplied ErrorNoNamespace = errors.New("no namespace given") )
Functions ¶
func CanOperate ¶
CanOperate checks if an operation can be performed on an existing secret
func ParseOrFetchNamespaces ¶
func ParseOrFetchNamespaces( ctx context.Context, client corev1.NamespacesGetter, objAnnotations map[string]string, ) ([]string, error)
ParseOrFetchNamespaces parses the namespaces of a secret from the specified annotation and retrives either all namespaces (if `*` is in the field of the annotation) or the specified namespaces. An empty annotation yields no namespaces.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.