From c6fe289898394a81960a2f50303895dcfedb48eb Mon Sep 17 00:00:00 2001 From: Abhay Krishna Arunachalam Date: Mon, 18 Sep 2023 14:48:32 -0700 Subject: [PATCH] Ignore node taints when scheduling Cilium preflight daemonset --- pkg/networking/cilium/templater.go | 18 ------------------ pkg/networking/cilium/templater_test.go | 20 +------------------- 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/pkg/networking/cilium/templater.go b/pkg/networking/cilium/templater.go index 24e60da80743..fc873784d2a6 100644 --- a/pkg/networking/cilium/templater.go +++ b/pkg/networking/cilium/templater.go @@ -50,24 +50,6 @@ func (t *Templater) GenerateUpgradePreflightManifest(ctx context.Context, spec * tolerationsList := []map[string]string{ { - "key": "node.kubernetes.io/not-ready", - "effect": "NoSchedule", - }, - { - "key": "node-role.kubernetes.io/master", - "effect": "NoSchedule", - }, - { - "key": "node-role.kubernetes.io/control-plane", - "effect": "NoSchedule", - }, - { - "key": "node.cloudprovider.kubernetes.io/uninitialized", - "effect": "NoSchedule", - "value": "true", - }, - { - "key": "CriticalAddonsOnly", "operator": "Exists", }, } diff --git a/pkg/networking/cilium/templater_test.go b/pkg/networking/cilium/templater_test.go index 216c9cdf97ac..0f0965f08ef8 100644 --- a/pkg/networking/cilium/templater_test.go +++ b/pkg/networking/cilium/templater_test.go @@ -135,24 +135,6 @@ func TestTemplaterGenerateUpgradePreflightManifestSuccess(t *testing.T) { }, "tolerations": []map[string]string{ { - "key": "node.kubernetes.io/not-ready", - "effect": "NoSchedule", - }, - { - "key": "node-role.kubernetes.io/master", - "effect": "NoSchedule", - }, - { - "key": "node-role.kubernetes.io/control-plane", - "effect": "NoSchedule", - }, - { - "key": "node.cloudprovider.kubernetes.io/uninitialized", - "effect": "NoSchedule", - "value": "true", - }, - { - "key": "CriticalAddonsOnly", "operator": "Exists", }, }, @@ -445,7 +427,7 @@ func TestTemplaterGenerateManifestForSingleNodeCluster(t *testing.T) { tt.h.EXPECT(). Template(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). - DoAndReturn(func(_ interface{}, _ interface{}, _ interface{}, _ interface{}, values map[string]interface{}, _ interface{}) ([]byte, error) { + DoAndReturn(func(_, _, _, _ interface{}, values map[string]interface{}, _ interface{}) ([]byte, error) { tt.Expect(reflect.ValueOf(values["operator"]).MapIndex(reflect.ValueOf("replicas")).Interface().(int)).To(Equal(1)) return tt.manifest, nil })