mirror of https://github.com/kubernetes/kops.git
Merge pull request #16708 from rifelpet/aws-plugin-unregister
Fix InTreePluginAWSUnregister feature gate removal in 1.31
This commit is contained in:
commit
f19c837ed5
|
@ -183,10 +183,8 @@ func (b *KubeAPIServerOptionsBuilder) BuildOptions(o interface{}) error {
|
||||||
|
|
||||||
if clusterSpec.CloudProvider.AWS != nil {
|
if clusterSpec.CloudProvider.AWS != nil {
|
||||||
|
|
||||||
if _, found := c.FeatureGates["InTreePluginAWSUnregister"]; !found {
|
if _, found := c.FeatureGates["InTreePluginAWSUnregister"]; !found && b.IsKubernetesLT("1.31") {
|
||||||
c.FeatureGates["InTreePluginAWSUnregister"] = "true"
|
c.FeatureGates["InTreePluginAWSUnregister"] = "true"
|
||||||
} else if b.IsKubernetesGTE("1.31") {
|
|
||||||
delete(c.FeatureGates, "InTreePluginAWSUnregister")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, found := c.FeatureGates["CSIMigrationAWS"]; !found && b.IsKubernetesLT("1.27") {
|
if _, found := c.FeatureGates["CSIMigrationAWS"]; !found && b.IsKubernetesLT("1.27") {
|
||||||
|
|
|
@ -149,10 +149,8 @@ func (b *KubeControllerManagerOptionsBuilder) BuildOptions(o interface{}) error
|
||||||
kcm.FeatureGates = make(map[string]string)
|
kcm.FeatureGates = make(map[string]string)
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, found := kcm.FeatureGates["InTreePluginAWSUnregister"]; !found {
|
if _, found := kcm.FeatureGates["InTreePluginAWSUnregister"]; !found && b.IsKubernetesLT("1.31") {
|
||||||
kcm.FeatureGates["InTreePluginAWSUnregister"] = "true"
|
kcm.FeatureGates["InTreePluginAWSUnregister"] = "true"
|
||||||
} else if b.IsKubernetesGTE("1.31") {
|
|
||||||
delete(kcm.FeatureGates, "InTreePluginAWSUnregister")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, found := kcm.FeatureGates["CSIMigrationAWS"]; !found && b.IsKubernetesLT("1.27") {
|
if _, found := kcm.FeatureGates["CSIMigrationAWS"]; !found && b.IsKubernetesLT("1.27") {
|
||||||
|
|
|
@ -172,14 +172,12 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if clusterSpec.CloudProvider.AWS != nil {
|
if clusterSpec.CloudProvider.AWS != nil {
|
||||||
if _, found := clusterSpec.Kubelet.FeatureGates["CSIMigrationAWS"]; !found && b.IsKubernetesLT("1.27") {
|
if _, found := clusterSpec.Kubelet.FeatureGates["InTreePluginAWSUnregister"]; !found && b.IsKubernetesLT("1.31") {
|
||||||
clusterSpec.Kubelet.FeatureGates["CSIMigrationAWS"] = "true"
|
clusterSpec.Kubelet.FeatureGates["InTreePluginAWSUnregister"] = "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, found := clusterSpec.Kubelet.FeatureGates["InTreePluginAWSUnregister"]; !found {
|
if _, found := clusterSpec.Kubelet.FeatureGates["CSIMigrationAWS"]; !found && b.IsKubernetesLT("1.27") {
|
||||||
clusterSpec.Kubelet.FeatureGates["InTreePluginAWSUnregister"] = "true"
|
clusterSpec.Kubelet.FeatureGates["CSIMigrationAWS"] = "true"
|
||||||
} else if b.IsKubernetesGTE("1.31") {
|
|
||||||
delete(clusterSpec.Kubelet.FeatureGates, "InTreePluginAWSUnregister")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,8 @@ func (b *KubeSchedulerOptionsBuilder) BuildOptions(o interface{}) error {
|
||||||
config.FeatureGates = make(map[string]string)
|
config.FeatureGates = make(map[string]string)
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, found := config.FeatureGates["InTreePluginAWSUnregister"]; !found {
|
if _, found := config.FeatureGates["InTreePluginAWSUnregister"]; !found && b.IsKubernetesLT("1.31") {
|
||||||
config.FeatureGates["InTreePluginAWSUnregister"] = "true"
|
config.FeatureGates["InTreePluginAWSUnregister"] = "true"
|
||||||
} else if b.IsKubernetesGTE("1.31") {
|
|
||||||
delete(clusterSpec.Kubelet.FeatureGates, "InTreePluginAWSUnregister")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, found := config.FeatureGates["CSIMigrationAWS"]; !found && b.IsKubernetesLT("1.27") {
|
if _, found := config.FeatureGates["CSIMigrationAWS"]; !found && b.IsKubernetesLT("1.27") {
|
||||||
|
|
Loading…
Reference in New Issue