Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultPrefix defines the default prefix for user facing annotations DefaultAnnotationPrefix = "replication.schrodit.tech" // NamespacesAnnotation is the name of the annotation that defines the namespaces where the annotated resource should be replicated to. NamespacesAnnotation = "namespaces" // SecretReplicationNamespacesAnnotation is the name of the annotation that defines the namespaces where the annotated resource should be replicated to. SecretReplicationNamespacesAnnotation = "replication.schrodit.tech/namespaces" // AllNamespacesAnnotation is the name of the annotation that defines that the annotated resource should be replicated to all namespaces. AllNamespacesAnnotation = "all" // SecretReplicationAllNamespacesAnnotation is the name of the annotation that defines that the annotated resource should be replicated to all namespaces. SecretReplicationAllNamespacesAnnotation = "replication.schrodit.tech/all" // FromNamespaceAnnotation is the name of the annotation that defines where the defined secret of the ingress should be synced from. FromNamespaceAnnotation = "from-namespace" // SecretReplicationFromNamespaceAnnotation is the name of the annotation that defines where the defined secret of the ingress should be synced from. SecretReplicationFromNamespaceAnnotation = "replication.schrodit.tech/from-namespace" )
User facing annotations
View Source
const SecretReplicationLastObservedHashAnnotation = "replication.schrodit.tech/lastObservedHash"
SecretReplicationLastHashAnnotation is the name of the annotation that defines the last observed hash of the replicating secret.
View Source
const SecretReplicationReplicaOfAnnotation = "replication.schrodit.tech/replicaOf"
SecretReplicationReplicaOfAnnotation is the name of the annotation that defines the source resource of the current resource.
View Source
const Separator = "/"
Variables ¶
View Source
var ( // SecretReplicationNamespacesAnnotations are the names of the annotation that defines the namespaces where the annotated resource should be replicated to. SecretReplicationNamespacesAnnotations = NewAnnotationSet(NamespacesAnnotation, DefaultAnnotationPrefix) // SecretReplicationAllNamespacesAnnotations are the names of the annotation that defines that the annotated resource should be replicated to all namespaces. SecretReplicationAllNamespacesAnnotations = NewAnnotationSet(AllNamespacesAnnotation, DefaultAnnotationPrefix) // SecretReplicationFromNamespaceAnnotations are the names of the annotation that defines where the defined secret of the ingress should be synced from. SecretReplicationFromNamespaceAnnotations = NewAnnotationSet(FromNamespaceAnnotation, DefaultAnnotationPrefix) )
Functions ¶
This section is empty.
Types ¶
type AnnotationSet ¶ added in v0.3.0
func NewAnnotationSet ¶ added in v0.3.0
func NewAnnotationSet(key string, defaultAnn string) *AnnotationSet
NewAnnotationSet creates a new annotation set.
func (AnnotationSet) Add ¶ added in v0.3.0
func (s AnnotationSet) Add(prefix string) string
Add adds multiple annotation prefixes.
func (AnnotationSet) Get ¶ added in v0.3.0
func (s AnnotationSet) Get(annotations map[string]string) (string, bool)
Get returns the value of one of the matching annotations. Returns false if no annotations matches.
func (AnnotationSet) List ¶ added in v0.3.0
func (s AnnotationSet) List() []string
List returns all annotations as list.
func (*AnnotationSet) Reset ¶ added in v0.3.0
func (s *AnnotationSet) Reset()
Reset resets to the default annotation
Click to show internal directories.
Click to hide internal directories.