Skip to content

Commit

Permalink
Disable ETCD Learner Mode
Browse files Browse the repository at this point in the history
ETCD Learner Mode went to Beta in k8s 1.29 and is now default enabled.

When a new stacked etcd instance comes up, it joins the cluster in learner mode.

The API Server cannot perform rpc calls against its etcd instance, and fails to come online.

In theory the etcd instance should be promoted to a full member and this issue should
be resolved, but for some reason this is not happening.

While we investigate a root cause, we are disabling this new feature flag explicitly.
  • Loading branch information
jonathanmeier5 committed Feb 21, 2024
1 parent 6196729 commit 7b59ee5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/providers/cloudstack/config/template-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ spec:
name: {{.controlPlaneTemplateName}}
kubeadmConfigSpec:
clusterConfiguration:
featureGates:
EtcdLearnerMode: false
imageRepository: {{.kubernetesRepository}}
etcd:
{{- if .externalEtcd }}
Expand Down
2 changes: 2 additions & 0 deletions pkg/providers/docker/config/template-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ spec:
namespace: {{.eksaSystemNamespace}}
kubeadmConfigSpec:
clusterConfiguration:
featureGates:
EtcdLearnerMode: false
imageRepository: {{.kubernetesRepository}}
etcd:
{{- if .externalEtcd }}
Expand Down
1 change: 1 addition & 0 deletions pkg/providers/snow/apibuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func KubeadmControlPlane(log logr.Logger, clusterSpec *cluster.Spec, snowMachine
joinConfigKubeletExtraArg["provider-id"] = "aws-snow:////'{{ ds.meta_data.instance_id }}'"

addStackedEtcdExtraArgsInKubeadmControlPlane(kcp, clusterSpec.Cluster.Spec.ExternalEtcdConfiguration)
disableEtcdLearnerMode(kcp)

machineConfig := clusterSpec.SnowMachineConfig(clusterSpec.Cluster.Spec.ControlPlaneConfiguration.MachineGroupRef.Name)

Expand Down
4 changes: 4 additions & 0 deletions pkg/providers/snow/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ func addStackedEtcdExtraArgsInKubeadmControlPlane(kcp *controlplanev1.KubeadmCon
stackedEtcdExtraArgs["listen-peer-urls"] = "https://0.0.0.0:2380"
stackedEtcdExtraArgs["listen-client-urls"] = "https://0.0.0.0:2379"
}

func disableEtcdLearnerMode(kcp *controlplanev1.KubeadmControlPlane) {
kcp.Spec.KubeadmConfigSpec.ClusterConfiguration.FeatureGates["EtcdLearnerMode"] = false
}
2 changes: 2 additions & 0 deletions pkg/providers/tinkerbell/config/template-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ metadata:
spec:
kubeadmConfigSpec:
clusterConfiguration:
featureGates:
EtcdLearnerMode: false
imageRepository: {{.kubernetesRepository}}
etcd:
{{- if .externalEtcd }}
Expand Down
2 changes: 2 additions & 0 deletions pkg/providers/vsphere/config/template-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ spec:
name: {{.controlPlaneTemplateName}}
kubeadmConfigSpec:
clusterConfiguration:
featureGates:
EtcdLearnerMode: false
imageRepository: {{.kubernetesRepository}}
etcd:
{{- if .externalEtcd }}
Expand Down

0 comments on commit 7b59ee5

Please sign in to comment.