From ae916c2decbed8ff63db71211c8f83025a68bcd0 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Wed, 23 Sep 2020 23:06:00 -0700 Subject: [PATCH] Use const for kube-system namespace Signed-off-by: Brad Davidson --- pkg/cluster/https.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cluster/https.go b/pkg/cluster/https.go index 6429b9440b..a03b65038b 100644 --- a/pkg/cluster/https.go +++ b/pkg/cluster/https.go @@ -17,6 +17,7 @@ import ( "github.com/rancher/k3s/pkg/version" "github.com/rancher/wrangler-api/pkg/generated/controllers/core" "github.com/sirupsen/logrus" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func (c *Cluster) newListener(ctx context.Context) (net.Listener, http.Handler, error) { @@ -84,5 +85,5 @@ func tlsStorage(ctx context.Context, dataDir string, runtime *config.ControlRunt cache := memory.NewBacked(fileStorage) return kubernetes.New(ctx, func() *core.Factory { return runtime.Core - }, "kube-system", ""+version.Program+"-serving", cache) + }, metav1.NamespaceSystem, version.Program+"-serving", cache) }