From 347722cb2d4626ecb355e49e9a906dac55297504 Mon Sep 17 00:00:00 2001 From: Ken Sipe Date: Tue, 19 May 2020 13:49:00 -0500 Subject: [PATCH] moving annotation label to const Signed-off-by: Ken Sipe --- pkg/kudoctl/util/kudo/kudo.go | 2 +- pkg/util/kudo/labels.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/kudoctl/util/kudo/kudo.go b/pkg/kudoctl/util/kudo/kudo.go index 8cacf2375..d47ff80d0 100644 --- a/pkg/kudoctl/util/kudo/kudo.go +++ b/pkg/kudoctl/util/kudo/kudo.go @@ -405,7 +405,7 @@ func (c *Client) CreateNamespace(namespace, manifest string) error { } ns.TypeMeta.Kind = "Namespace" ns.Name = namespace - ns.Annotations["created-by"] = "kudo-cli" + ns.Annotations[label.CreatedByAnnotation] = "kudo-cli" _, err := c.kubeClientset.CoreV1().Namespaces().Create(ns) return err diff --git a/pkg/util/kudo/labels.go b/pkg/util/kudo/labels.go index 405b64fcc..ab0796ab4 100644 --- a/pkg/util/kudo/labels.go +++ b/pkg/util/kudo/labels.go @@ -28,4 +28,6 @@ const ( // Last applied state for three way merges LastAppliedConfigAnnotation = "kudo.dev/last-applied-configuration" + + CreatedByAnnotation = "kudo.dev/created-by" )