Skip to content

Commit

Permalink
Better naming
Browse files Browse the repository at this point in the history
Co-authored-by: Stephan Aßmus <[email protected]>
  • Loading branch information
fiksn and stippi2 committed Oct 7, 2024
1 parent c4afdc6 commit f65499c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion replicate/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions replicate/common/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

0 comments on commit f65499c

Please sign in to comment.