From bf57a7f4192e2121db1e5883210da35f781598d5 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Wed, 22 Jan 2020 10:57:21 -0700 Subject: [PATCH] Don't start node controller if coredns is not deployed --- pkg/server/server.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/server/server.go b/pkg/server/server.go index 7105b713e6..a43f5232fb 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -27,6 +27,7 @@ import ( v1 "github.com/rancher/wrangler-api/pkg/generated/controllers/core/v1" "github.com/rancher/wrangler/pkg/leader" "github.com/rancher/wrangler/pkg/resolvehome" + "github.com/rancher/wrangler/pkg/slice" "github.com/sirupsen/logrus" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/net" @@ -126,8 +127,10 @@ func startWrangler(ctx context.Context, config *Config) error { } func masterControllers(ctx context.Context, sc *Context, config *Config) error { - if err := node.Register(ctx, sc.Core.Core().V1().ConfigMap(), sc.Core.Core().V1().Node()); err != nil { - return err + if !slice.ContainsString(config.ControlConfig.Skips, "coredns") { + if err := node.Register(ctx, sc.Core.Core().V1().ConfigMap(), sc.Core.Core().V1().Node()); err != nil { + return err + } } helm.Register(ctx, sc.Apply,