Skip to content

Commit

Permalink
Ignore node taints when scheduling Cilium preflight daemonset (#6698)
Browse files Browse the repository at this point in the history
Co-authored-by: Abhay Krishna Arunachalam <arnchlm@amazon.com>
  • Loading branch information
eks-distro-pr-bot and abhay-krishna authored Sep 19, 2023
1 parent 59022e4 commit 0100084
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 37 deletions.
18 changes: 0 additions & 18 deletions pkg/networking/cilium/templater.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
}
Expand Down
20 changes: 1 addition & 19 deletions pkg/networking/cilium/templater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
Expand Down Expand Up @@ -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
})
Expand Down

0 comments on commit 0100084

Please sign in to comment.