diff --git a/replicate/common/common.go b/replicate/common/common.go index da6830b9..8e484ae8 100644 --- a/replicate/common/common.go +++ b/replicate/common/common.go @@ -56,7 +56,7 @@ func CopyAnnotations[I, O Annotatable](input I, output O) { strip, ok := val[StripAnnotations] if !ok || strings.ToLower(strip) != "true" { for k, v := range val { - if strings.HasPrefix(k, Prefix) { + if strings.HasPrefix(k, ReplicatorPrefix) { continue } copy[k] = v diff --git a/replicate/common/consts.go b/replicate/common/consts.go index 67f6a845..cb260349 100644 --- a/replicate/common/consts.go +++ b/replicate/common/consts.go @@ -2,19 +2,19 @@ package common // Annotations that are used to control this Controller's behaviour const ( - Prefix = "replicator.v1.mittwald.de" + ReplicatorPrefix = "replicator.v1.mittwald.de" ) var ( - ReplicateFromAnnotation = Prefix + "/replicate-from" - ReplicatedAtAnnotation = Prefix + "/replicated-at" - ReplicatedFromVersionAnnotation = Prefix + "/replicated-from-version" - ReplicatedKeysAnnotation = Prefix + "/replicated-keys" - ReplicationAllowed = Prefix + "/replication-allowed" - ReplicationAllowedNamespaces = Prefix + "/replication-allowed-namespaces" - ReplicateTo = Prefix + "/replicate-to" - ReplicateToMatching = Prefix + "/replicate-to-matching" - KeepOwnerReferences = Prefix + "/keep-owner-references" - StripLabels = Prefix + "/strip-labels" - StripAnnotations = Prefix + "/strip-annotations" + ReplicateFromAnnotation = ReplicatorPrefix + "/replicate-from" + ReplicatedAtAnnotation = ReplicatorPrefix + "/replicated-at" + ReplicatedFromVersionAnnotation = ReplicatorPrefix + "/replicated-from-version" + ReplicatedKeysAnnotation = ReplicatorPrefix + "/replicated-keys" + ReplicationAllowed = ReplicatorPrefix + "/replication-allowed" + ReplicationAllowedNamespaces = ReplicatorPrefix + "/replication-allowed-namespaces" + ReplicateTo = ReplicatorPrefix + "/replicate-to" + ReplicateToMatching = ReplicatorPrefix + "/replicate-to-matching" + KeepOwnerReferences = ReplicatorPrefix + "/keep-owner-references" + StripLabels = ReplicatorPrefix + "/strip-labels" + StripAnnotations = ReplicatorPrefix + "/strip-annotations" )