integ/kubernetes/kubernetes-1.32.2/debian/deb_folder/patches/Revert-kubeadm-use-new-etcd-livez-and-readyz-endpoint.patch
Saba Touheed Mujawar 9914804400 Add kubernetes 1.32.2 patches
This change ports the following kubernetes 1.32.2 patches.
There are no functional changes.

kubeadm-platform-pods-zero-cpu-resources-readiness-p.patch
kubelet-isolcpus-SMT-aware-sorted-allocation.patch
kubelet-disable-CFS-quota-throttling-non-integer-cpu.patch
kubelet-cpumanager-keep-normal-containers-off-reserv.patch
kubelet-cpumanager-platform-pods-on-reserved-cpus.patch
kubelet-cpumanager-introduce-concept-of-isolated-CPU.patch
kubeadm-reduce-UpgradeManifestTimeout.patch
Revert-kubeadm-use-new-etcd-livez-and-readyz-endpoint.patch

Note: kubelet-disable-CFS-quota-throttling-non-integer-cpu.patch
      is to be maintained until Kubernetes 1.33, when the following
      commit will be included in the release:
      1c5170ff52

Test Plan:
PASS: Kubernetes package 1.32.2 builds properly.
PASS: Tested Kubernetes patches on a running system.
PASS: Run following make tests successfully:
      make test WHAT=./pkg/kubelet/cm GOFLAGS="-v"
      make test WHAT=./pkg/kubelet/cm/cpumanager GOFLAGS="-v"
      make test WHAT=./pkg/kubelet/cm/cpumanager/state GOFLAGS="-v"
      make test WHAT=./pkg/kubelet/cm/cpumanager/topology GOFLAGS="-v"
      make test WHAT=./pkg/kubelet/cm/topologymanager GOFLAGS="-v"
      make test WHAT=./pkg/kubelet/cm/devicemanager GOFLAGS="-v"
      make test WHAT=./pkg/kubelet/cm/memorymanager GOFLAGS="-v"
      make test WHAT=./pkg/kubelet/kuberuntime GOFLAGS="-v"
      make test WHAT=./cmd/kubeadm/app/constants GOFLAGS="-v"
      make test WHAT=./cmd/kubeadm/app/phases/controlplane GOFLAGS="-v"
      make test WHAT=./pkg/kubelet/cm GOFLAGS="-v"
      make test WHAT=./cmd/kubeadm/app/phases/addons/dns/ GOFLAGS="-v"

Story: 2011340
Task: 52098

Change-Id: I64052894ccd1f2cc97ba1be1b82f33a6d741c15c
Signed-off-by: Saba Touheed Mujawar <sabatouheed.mujawar@windriver.com>
2025-05-06 09:29:46 -04:00

124 lines
4.8 KiB
Diff

From ebe4522062301de6d58da76d157403c56eb6c27e Mon Sep 17 00:00:00 2001
From: Saba Touheed Mujawar <sabatouheed.mujawar@windriver.com>
Date: Tue, 29 Apr 2025 10:21:01 -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.
Signed-off-by: Saba Touheed Mujawar <sabatouheed.mujawar@windriver.com>
---
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 d9e7c579f44..5ad3c3c87ed 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.34.1