Revert K8s change to install 1.32.2 with the etcd 3.4
This change reverts the commit "kubeadm: use etcd 3.5.11's /livez and /readyz endpoints for probes" to install K8s 1.32.2 with the existing etcd version 3.4. https://github.com/kubernetes/kubernetes/pull/124465/commits These change needs to be reverted later after upgrading the etcd version to >= 3.5.11. Story: 2011340 Task: 51979 Test Plan: PASS: Kubernetes package 1.32.2 builds properly. PASS: Run all kubelet, kubeadm, kubectl make tests for affected code. PASS: Fresh install AIO-SX with K8s v1.32.2. Change-Id: Iecbde29d9c442cab70e4fb3747847e51fb00fd71 Signed-off-by: Boovan Rajendran <boovan.rajendran@windriver.com>
This commit is contained in:
parent
c1861c3502
commit
d926419e72
@ -0,0 +1,121 @@
|
|||||||
|
From 39fcdd692beb7cc0e3d6a528f964bb891ba4d71f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Boovan Rajendran <boovan.rajendran@windriver.com>
|
||||||
|
Date: Mon, 14 Apr 2025 06:26:59 -0400
|
||||||
|
Subject: [PATCH] Revert "kubeadm: use new etcd /livez and /readyz endpoints"
|
||||||
|
|
||||||
|
This reverts commit eeac2dda7091c1f1ea100e7637291bba2345bb0b and
|
||||||
|
partially reverts commit a04cc020f1b3992fcf185ef2b1bf12c55815fb5a
|
||||||
|
to install K8s 1.32.2 with the existing etcd version 3.4. This patch
|
||||||
|
needs to be removed after upgrading the etcd version to >= 3.5.11.
|
||||||
|
---
|
||||||
|
cmd/kubeadm/app/constants/constants.go | 2 +-
|
||||||
|
cmd/kubeadm/app/constants/constants_test.go | 12 ++++--------
|
||||||
|
cmd/kubeadm/app/phases/etcd/local.go | 9 +++------
|
||||||
|
cmd/kubeadm/app/phases/etcd/local_test.go | 13 ++-----------
|
||||||
|
4 files changed, 10 insertions(+), 26 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go
|
||||||
|
index 3cff2113fa0..6c89e075dc0 100644
|
||||||
|
--- a/cmd/kubeadm/app/constants/constants.go
|
||||||
|
+++ b/cmd/kubeadm/app/constants/constants.go
|
||||||
|
@@ -323,7 +323,7 @@ const (
|
||||||
|
KubeletHealthzPort = 10248
|
||||||
|
|
||||||
|
// MinExternalEtcdVersion indicates minimum external etcd version which kubeadm supports
|
||||||
|
- MinExternalEtcdVersion = "3.5.11-0"
|
||||||
|
+ MinExternalEtcdVersion = "3.4.13-4"
|
||||||
|
|
||||||
|
// DefaultEtcdVersion indicates the default etcd version that kubeadm uses
|
||||||
|
DefaultEtcdVersion = "3.5.16-0"
|
||||||
|
diff --git a/cmd/kubeadm/app/constants/constants_test.go b/cmd/kubeadm/app/constants/constants_test.go
|
||||||
|
index 779ec5fda9a..5a46ee20b0c 100644
|
||||||
|
--- a/cmd/kubeadm/app/constants/constants_test.go
|
||||||
|
+++ b/cmd/kubeadm/app/constants/constants_test.go
|
||||||
|
@@ -98,15 +98,11 @@ func TestGetStaticPodFilepath(t *testing.T) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-func TestEtcdSupportedVersionLength(t *testing.T) {
|
||||||
|
- const max = 4
|
||||||
|
- if len(SupportedEtcdVersion) > max {
|
||||||
|
- t.Fatalf("SupportedEtcdVersion must not include more than %d versions", max)
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
func TestEtcdSupportedVersion(t *testing.T) {
|
||||||
|
var supportedEtcdVersion = map[uint8]string{
|
||||||
|
+ 13: "3.2.24",
|
||||||
|
+ 14: "3.3.10",
|
||||||
|
+ 15: "3.3.10",
|
||||||
|
16: "3.3.17-0",
|
||||||
|
17: "3.4.3-0",
|
||||||
|
18: "3.4.3-0",
|
||||||
|
@@ -125,7 +121,7 @@ func TestEtcdSupportedVersion(t *testing.T) {
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kubernetesVersion: "1.10.1",
|
||||||
|
- expectedVersion: version.MustParseSemantic("3.3.17-0"),
|
||||||
|
+ expectedVersion: version.MustParseSemantic("3.2.24"),
|
||||||
|
expectedWarning: true,
|
||||||
|
expectedError: false,
|
||||||
|
},
|
||||||
|
diff --git a/cmd/kubeadm/app/phases/etcd/local.go b/cmd/kubeadm/app/phases/etcd/local.go
|
||||||
|
index 9e9b19004af..9b04e684c55 100644
|
||||||
|
--- a/cmd/kubeadm/app/phases/etcd/local.go
|
||||||
|
+++ b/cmd/kubeadm/app/phases/etcd/local.go
|
||||||
|
@@ -226,12 +226,9 @@ func GetEtcdPodSpec(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmapi.A
|
||||||
|
v1.ResourceMemory: resource.MustParse("100Mi"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
- // The etcd probe endpoints are explained here:
|
||||||
|
- // https://github.com/kubernetes/kubeadm/issues/3039
|
||||||
|
- LivenessProbe: staticpodutil.LivenessProbe(probeHostname, "/livez", probePort, probeScheme),
|
||||||
|
- ReadinessProbe: staticpodutil.ReadinessProbe(probeHostname, "/readyz", probePort, probeScheme),
|
||||||
|
- StartupProbe: staticpodutil.StartupProbe(probeHostname, "/readyz", probePort, probeScheme, componentHealthCheckTimeout),
|
||||||
|
- Env: kubeadmutil.MergeKubeadmEnvVars(cfg.Etcd.Local.ExtraEnvs),
|
||||||
|
+ LivenessProbe: staticpodutil.LivenessProbe(probeHostname, "/health?exclude=NOSPACE&serializable=true", probePort, probeScheme),
|
||||||
|
+ StartupProbe: staticpodutil.StartupProbe(probeHostname, "/health?serializable=false", probePort, probeScheme, componentHealthCheckTimeout),
|
||||||
|
+ Env: kubeadmutil.MergeKubeadmEnvVars(cfg.Etcd.Local.ExtraEnvs),
|
||||||
|
},
|
||||||
|
etcdMounts,
|
||||||
|
// etcd will listen on the advertise address of the API server, in a different port (2379)
|
||||||
|
diff --git a/cmd/kubeadm/app/phases/etcd/local_test.go b/cmd/kubeadm/app/phases/etcd/local_test.go
|
||||||
|
index 50cd5a96c6c..e04c8655eb5 100644
|
||||||
|
--- a/cmd/kubeadm/app/phases/etcd/local_test.go
|
||||||
|
+++ b/cmd/kubeadm/app/phases/etcd/local_test.go
|
||||||
|
@@ -129,22 +129,13 @@ spec:
|
||||||
|
failureThreshold: 8
|
||||||
|
httpGet:
|
||||||
|
host: 127.0.0.1
|
||||||
|
- path: /livez
|
||||||
|
+ path: /health?exclude=NOSPACE&serializable=true
|
||||||
|
port: 2381
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 15
|
||||||
|
name: etcd
|
||||||
|
- readinessProbe:
|
||||||
|
- failureThreshold: 3
|
||||||
|
- httpGet:
|
||||||
|
- host: 127.0.0.1
|
||||||
|
- path: /readyz
|
||||||
|
- port: 2381
|
||||||
|
- scheme: HTTP
|
||||||
|
- periodSeconds: 1
|
||||||
|
- timeoutSeconds: 15
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
@@ -153,7 +144,7 @@ spec:
|
||||||
|
failureThreshold: 24
|
||||||
|
httpGet:
|
||||||
|
host: 127.0.0.1
|
||||||
|
- path: /readyz
|
||||||
|
+ path: /health?serializable=false
|
||||||
|
port: 2381
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
Revert-kubeadm-use-new-etcd-livez-and-readyz-endpoint.patch
|
Loading…
x
Reference in New Issue
Block a user