From ed6192bb30f05b2d90a531c5f21b3cb9e67adaf4 Mon Sep 17 00:00:00 2001 From: Rafael Franzke Date: Thu, 19 Sep 2019 08:20:29 +0200 Subject: [PATCH] Remove `KubeletPluginsWatcher` feature gate The feature gate was already beta in 1.13 (least supported version of Alicloud/Packet which were using it) and enabled by default, it graduated to GA in 1.14. We never needed to explicitly enable it, we just have to make sure that it's not disabled. See kubernetes/kubernetes#79310 --- .../provider-alicloud/pkg/webhook/controlplane/ensurer.go | 3 --- .../provider-alicloud/pkg/webhook/controlplane/ensurer_test.go | 2 -- .../provider-packet/pkg/webhook/controlplane/ensurer.go | 3 --- .../provider-packet/pkg/webhook/controlplane/ensurer_test.go | 2 -- 4 files changed, 10 deletions(-) diff --git a/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer.go b/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer.go index a7c6cd1ab..ee35c69f2 100644 --- a/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer.go +++ b/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer.go @@ -79,8 +79,6 @@ func ensureKubeAPIServerCommandLineArgs(c *corev1.Container) { "CSINodeInfo=true", ",") c.Command = extensionswebhook.EnsureStringWithPrefixContains(c.Command, "--feature-gates=", "CSIDriverRegistry=true", ",") - c.Command = extensionswebhook.EnsureStringWithPrefixContains(c.Command, "--feature-gates=", - "KubeletPluginsWatcher=true", ",") } func ensureKubeControllerManagerCommandLineArgs(c *corev1.Container) { @@ -113,6 +111,5 @@ func (e *ensurer) EnsureKubeletConfiguration(ctx context.Context, kubeletConfig kubeletConfig.FeatureGates["VolumeSnapshotDataSource"] = true kubeletConfig.FeatureGates["CSINodeInfo"] = true kubeletConfig.FeatureGates["CSIDriverRegistry"] = true - kubeletConfig.FeatureGates["KubeletPluginsWatcher"] = true return nil } diff --git a/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer_test.go b/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer_test.go index d9e2c8fa8..679361f7b 100644 --- a/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer_test.go +++ b/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer_test.go @@ -218,7 +218,6 @@ var _ = Describe("Ensurer", func() { "VolumeSnapshotDataSource": true, "CSINodeInfo": true, "CSIDriverRegistry": true, - "KubeletPluginsWatcher": true, }, } ) @@ -245,7 +244,6 @@ func checkKubeAPIServerDeployment(dep *appsv1.Deployment) { Expect(c.Command).To(test.ContainElementWithPrefixContaining("--feature-gates=", "VolumeSnapshotDataSource=true", ",")) Expect(c.Command).To(test.ContainElementWithPrefixContaining("--feature-gates=", "CSINodeInfo=true", ",")) Expect(c.Command).To(test.ContainElementWithPrefixContaining("--feature-gates=", "CSIDriverRegistry=true", ",")) - Expect(c.Command).To(test.ContainElementWithPrefixContaining("--feature-gates=", "KubeletPluginsWatcher=true", ",")) } func checkKubeControllerManagerDeployment(dep *appsv1.Deployment) { diff --git a/controllers/provider-packet/pkg/webhook/controlplane/ensurer.go b/controllers/provider-packet/pkg/webhook/controlplane/ensurer.go index 626516976..e668c8234 100644 --- a/controllers/provider-packet/pkg/webhook/controlplane/ensurer.go +++ b/controllers/provider-packet/pkg/webhook/controlplane/ensurer.go @@ -91,8 +91,6 @@ func ensureKubeAPIServerCommandLineArgs(c *corev1.Container) { "CSINodeInfo=true", ",") c.Command = extensionswebhook.EnsureStringWithPrefixContains(c.Command, "--feature-gates=", "CSIDriverRegistry=true", ",") - c.Command = extensionswebhook.EnsureStringWithPrefixContains(c.Command, "--feature-gates=", - "KubeletPluginsWatcher=true", ",") } func ensureKubeControllerManagerCommandLineArgs(c *corev1.Container) { @@ -142,6 +140,5 @@ func (e *ensurer) EnsureKubeletConfiguration(ctx context.Context, kubeletConfig kubeletConfig.FeatureGates["VolumeSnapshotDataSource"] = true kubeletConfig.FeatureGates["CSINodeInfo"] = true kubeletConfig.FeatureGates["CSIDriverRegistry"] = true - kubeletConfig.FeatureGates["KubeletPluginsWatcher"] = true return nil } diff --git a/controllers/provider-packet/pkg/webhook/controlplane/ensurer_test.go b/controllers/provider-packet/pkg/webhook/controlplane/ensurer_test.go index cfbc0f3b0..299a24724 100644 --- a/controllers/provider-packet/pkg/webhook/controlplane/ensurer_test.go +++ b/controllers/provider-packet/pkg/webhook/controlplane/ensurer_test.go @@ -253,7 +253,6 @@ var _ = Describe("Ensurer", func() { "VolumeSnapshotDataSource": true, "CSINodeInfo": true, "CSIDriverRegistry": true, - "KubeletPluginsWatcher": true, }, } ) @@ -280,7 +279,6 @@ func checkKubeAPIServerDeployment(dep *appsv1.Deployment, annotations map[string Expect(c.Command).To(test.ContainElementWithPrefixContaining("--feature-gates=", "VolumeSnapshotDataSource=true", ",")) Expect(c.Command).To(test.ContainElementWithPrefixContaining("--feature-gates=", "CSINodeInfo=true", ",")) Expect(c.Command).To(test.ContainElementWithPrefixContaining("--feature-gates=", "CSIDriverRegistry=true", ",")) - Expect(c.Command).To(test.ContainElementWithPrefixContaining("--feature-gates=", "KubeletPluginsWatcher=true", ",")) // Check that the Pod template contains all needed checksum annotations Expect(dep.Spec.Template.Annotations).To(Equal(annotations))