Skip to content

Commit

Permalink
Remove ServiceLoadBalancerClass feature gate (#7711)
Browse files Browse the repository at this point in the history
  • Loading branch information
sp1999 authored Feb 29, 2024
1 parent 216b599 commit c3e1baa
Show file tree
Hide file tree
Showing 34 changed files with 0 additions and 84 deletions.
11 changes: 0 additions & 11 deletions pkg/clusterapi/extraargs.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,6 @@ func EtcdEncryptionExtraArgs(config *[]v1alpha1.EtcdEncryption) ExtraArgs {
return args
}

// FeatureGatesExtraArgs takes a list of features with the value and returns it in the proper format
// Example FeatureGatesExtraArgs("ServiceLoadBalancerClass=true").
func FeatureGatesExtraArgs(features ...string) ExtraArgs {
if len(features) == 0 {
return nil
}
return ExtraArgs{
"feature-gates": strings.Join(features[:], ","),
}
}

func PodIAMAuthExtraArgs(podIAMConfig *v1alpha1.PodIAMConfig) ExtraArgs {
if podIAMConfig == nil {
return nil
Expand Down
36 changes: 0 additions & 36 deletions pkg/clusterapi/extraargs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,39 +621,3 @@ func TestEtcdEncryptionExtraArgs(t *testing.T) {
})
}
}

func TestFeatureGatesExtraArgs(t *testing.T) {
tests := []struct {
testName string
features []string
want clusterapi.ExtraArgs
}{
{
testName: "no feature gates",
features: []string{},
want: nil,
},
{
testName: "single feature gate",
features: []string{"feature1=true"},
want: clusterapi.ExtraArgs{
"feature-gates": "feature1=true",
},
},
{
testName: "multiple feature gates",
features: []string{"feature1=true", "feature2=false", "feature3=true"},
want: clusterapi.ExtraArgs{
"feature-gates": "feature1=true,feature2=false,feature3=true",
},
},
}

for _, tt := range tests {
t.Run(tt.testName, func(t *testing.T) {
if got := clusterapi.FeatureGatesExtraArgs(tt.features...); !reflect.DeepEqual(got, tt.want) {
t.Errorf("FeatureGatesExtraArgs() = %v, want %v", got, tt.want)
}
})
}
}
2 changes: 0 additions & 2 deletions pkg/providers/tinkerbell/controlplane_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ spec:
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
authentication-token-webhook-config-file: /etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down Expand Up @@ -574,7 +573,6 @@ spec:
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
authentication-token-webhook-config-file: /etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
5 changes: 0 additions & 5 deletions pkg/providers/tinkerbell/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,6 @@ func buildTemplateMapCP(
Append(clusterapi.AwsIamAuthExtraArgs(clusterSpec.AWSIamConfig)).
Append(clusterapi.PodIAMAuthExtraArgs(clusterSpec.Cluster.Spec.PodIAMConfig))

// LoadBalancerClass is feature gated in K8S v1.21 and needs to be enabled manually
if clusterSpec.Cluster.Spec.KubernetesVersion == v1alpha1.Kube121 {
apiServerExtraArgs.Append(clusterapi.FeatureGatesExtraArgs("ServiceLoadBalancerClass=true"))
}

kubeletExtraArgs := clusterapi.SecureTlsCipherSuitesExtraArgs().
Append(clusterapi.ResolvConfExtraArgs(clusterSpec.Cluster.Spec.ClusterNetwork.DNS.ResolvConf)).
Append(clusterapi.ControlPlaneNodeLabelsExtraArgs(clusterSpec.Cluster.Spec.ControlPlaneConfiguration))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /var/lib/kubeadm/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /var/lib/kubeadm/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /var/lib/kubeadm/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /var/lib/kubeadm/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ spec:
audit-log-maxsize: "512"
audit-log-path: /var/log/kubernetes/api-audit.log
audit-policy-file: /etc/kubernetes/audit-policy.yaml
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /var/lib/kubeadm/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /var/lib/kubeadm/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /var/lib/kubeadm/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /var/lib/kubeadm/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ spec:
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
authentication-token-webhook-config-file: /etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
oidc-client-id: my-client-id
oidc-groups-claim: claim1
oidc-groups-prefix: prefix-for-groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
oidc-client-id: my-client-id
oidc-issuer-url: https://mydomain.com/issuer
extraVolumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ spec:
audit-log-maxsize: "512"
audit-log-path: /var/log/kubernetes/api-audit.log
audit-policy-file: /etc/kubernetes/audit-policy.yaml
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ spec:
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
authentication-token-webhook-config-file: /etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml
feature-gates: ServiceLoadBalancerClass=true
service-account-issuer: https://test
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
audit-log-maxage: "30"
audit-log-maxbackup: "10"
audit-log-maxsize: "512"
feature-gates: ServiceLoadBalancerClass=true
extraVolumes:
- hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
Expand Down

0 comments on commit c3e1baa

Please sign in to comment.