v1alpha1

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: MIT Imports: 1 Imported by: 0

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

type AnnotationSet struct {
	Default string
	Key     string
	// contains filtered or unexported fields
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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