File tree Expand file tree Collapse file tree 4 files changed +7
-15
lines changed Expand file tree Collapse file tree 4 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -183,10 +183,8 @@ func (b *KubeAPIServerOptionsBuilder) BuildOptions(o interface{}) error {
183183
184184 if clusterSpec .CloudProvider .AWS != nil {
185185
186- if _ , found := c .FeatureGates ["InTreePluginAWSUnregister" ]; ! found {
186+ if _ , found := c .FeatureGates ["InTreePluginAWSUnregister" ]; ! found && b . IsKubernetesLT ( "1.31" ) {
187187 c .FeatureGates ["InTreePluginAWSUnregister" ] = "true"
188- } else if b .IsKubernetesGTE ("1.31" ) {
189- delete (c .FeatureGates , "InTreePluginAWSUnregister" )
190188 }
191189
192190 if _ , found := c .FeatureGates ["CSIMigrationAWS" ]; ! found && b .IsKubernetesLT ("1.27" ) {
Original file line number Diff line number Diff line change @@ -149,10 +149,8 @@ func (b *KubeControllerManagerOptionsBuilder) BuildOptions(o interface{}) error
149149 kcm .FeatureGates = make (map [string ]string )
150150 }
151151
152- if _ , found := kcm .FeatureGates ["InTreePluginAWSUnregister" ]; ! found {
152+ if _ , found := kcm .FeatureGates ["InTreePluginAWSUnregister" ]; ! found && b . IsKubernetesLT ( "1.31" ) {
153153 kcm .FeatureGates ["InTreePluginAWSUnregister" ] = "true"
154- } else if b .IsKubernetesGTE ("1.31" ) {
155- delete (kcm .FeatureGates , "InTreePluginAWSUnregister" )
156154 }
157155
158156 if _ , found := kcm .FeatureGates ["CSIMigrationAWS" ]; ! found && b .IsKubernetesLT ("1.27" ) {
Original file line number Diff line number Diff line change @@ -172,14 +172,12 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {
172172 }
173173
174174 if clusterSpec .CloudProvider .AWS != nil {
175- if _ , found := clusterSpec .Kubelet .FeatureGates ["CSIMigrationAWS " ]; ! found && b .IsKubernetesLT ("1.27 " ) {
176- clusterSpec .Kubelet .FeatureGates ["CSIMigrationAWS " ] = "true"
175+ if _ , found := clusterSpec .Kubelet .FeatureGates ["InTreePluginAWSUnregister " ]; ! found && b .IsKubernetesLT ("1.31 " ) {
176+ clusterSpec .Kubelet .FeatureGates ["InTreePluginAWSUnregister " ] = "true"
177177 }
178178
179- if _ , found := clusterSpec .Kubelet .FeatureGates ["InTreePluginAWSUnregister" ]; ! found {
180- clusterSpec .Kubelet .FeatureGates ["InTreePluginAWSUnregister" ] = "true"
181- } else if b .IsKubernetesGTE ("1.31" ) {
182- delete (clusterSpec .Kubelet .FeatureGates , "InTreePluginAWSUnregister" )
179+ if _ , found := clusterSpec .Kubelet .FeatureGates ["CSIMigrationAWS" ]; ! found && b .IsKubernetesLT ("1.27" ) {
180+ clusterSpec .Kubelet .FeatureGates ["CSIMigrationAWS" ] = "true"
183181 }
184182 }
185183
Original file line number Diff line number Diff line change @@ -63,10 +63,8 @@ func (b *KubeSchedulerOptionsBuilder) BuildOptions(o interface{}) error {
6363 config .FeatureGates = make (map [string ]string )
6464 }
6565
66- if _ , found := config .FeatureGates ["InTreePluginAWSUnregister" ]; ! found {
66+ if _ , found := config .FeatureGates ["InTreePluginAWSUnregister" ]; ! found && b . IsKubernetesLT ( "1.31" ) {
6767 config .FeatureGates ["InTreePluginAWSUnregister" ] = "true"
68- } else if b .IsKubernetesGTE ("1.31" ) {
69- delete (clusterSpec .Kubelet .FeatureGates , "InTreePluginAWSUnregister" )
7068 }
7169
7270 if _ , found := config .FeatureGates ["CSIMigrationAWS" ]; ! found && b .IsKubernetesLT ("1.27" ) {
You can’t perform that action at this time.
0 commit comments