From 7aced6f0c392fa3d398a3f23e2f6921cfa6e52e6 Mon Sep 17 00:00:00 2001 From: bzsuni Date: Wed, 11 Sep 2024 10:50:41 +0800 Subject: [PATCH 1/2] Update etcd from v3.5.15 to v3.5.16 Signed-off-by: bzsuni --- build/dependencies.yaml | 2 +- cluster/gce/manifests/etcd.manifest | 4 ++-- cluster/gce/upgrade-aliases.sh | 4 ++-- cmd/kubeadm/app/constants/constants.go | 20 +++++++++---------- hack/lib/etcd.sh | 2 +- .../artifacts/example/deployment.yaml | 2 +- test/utils/image/manifest.go | 2 +- 7 files changed, 17 insertions(+), 19 deletions(-) diff --git a/build/dependencies.yaml b/build/dependencies.yaml index 67f5a1f4ec9c5..777ee41e6b49b 100644 --- a/build/dependencies.yaml +++ b/build/dependencies.yaml @@ -64,7 +64,7 @@ dependencies: # etcd - name: "etcd" - version: 3.5.15 + version: 3.5.16 refPaths: - path: cluster/gce/manifests/etcd.manifest match: etcd_docker_tag|etcd_version diff --git a/cluster/gce/manifests/etcd.manifest b/cluster/gce/manifests/etcd.manifest index 9f0b3186cf962..d0389c0f103df 100644 --- a/cluster/gce/manifests/etcd.manifest +++ b/cluster/gce/manifests/etcd.manifest @@ -18,7 +18,7 @@ { "name": "etcd-container", {{security_context}} - "image": "{{ pillar.get('etcd_docker_repository', 'registry.k8s.io/etcd') }}:{{ pillar.get('etcd_docker_tag', '3.5.15-0') }}", + "image": "{{ pillar.get('etcd_docker_repository', 'registry.k8s.io/etcd') }}:{{ pillar.get('etcd_docker_tag', '3.5.16-0') }}", "resources": { "requests": { "cpu": {{ cpulimit }} @@ -34,7 +34,7 @@ "value": "{{ pillar.get('storage_backend', 'etcd3') }}" }, { "name": "TARGET_VERSION", - "value": "{{ pillar.get('etcd_version', '3.5.15') }}" + "value": "{{ pillar.get('etcd_version', '3.5.16') }}" }, { "name": "DO_NOT_MOVE_BINARIES", diff --git a/cluster/gce/upgrade-aliases.sh b/cluster/gce/upgrade-aliases.sh index abe1dc73b09da..7d01fba61d015 100755 --- a/cluster/gce/upgrade-aliases.sh +++ b/cluster/gce/upgrade-aliases.sh @@ -170,8 +170,8 @@ export KUBE_GCE_ENABLE_IP_ALIASES=true export SECONDARY_RANGE_NAME="pods-default" export STORAGE_BACKEND="etcd3" export STORAGE_MEDIA_TYPE="application/vnd.kubernetes.protobuf" -export ETCD_IMAGE=3.5.15-0 -export ETCD_VERSION=3.5.15 +export ETCD_IMAGE=3.5.16-0 +export ETCD_VERSION=3.5.16 # Upgrade master with updated kube envs "${KUBE_ROOT}/cluster/gce/upgrade.sh" -M -l diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go index 47e6bed978270..f7e24e0edb4b3 100644 --- a/cmd/kubeadm/app/constants/constants.go +++ b/cmd/kubeadm/app/constants/constants.go @@ -309,7 +309,7 @@ const ( MinExternalEtcdVersion = "3.4.13-4" // DefaultEtcdVersion indicates the default etcd version that kubeadm uses - DefaultEtcdVersion = "3.5.15-0" + DefaultEtcdVersion = "3.5.16-0" // Etcd defines variable used internally when referring to etcd component Etcd = "etcd" @@ -464,16 +464,14 @@ var ( // SupportedEtcdVersion lists officially supported etcd versions with corresponding Kubernetes releases SupportedEtcdVersion = map[uint8]string{ - 22: "3.5.15-0", - 23: "3.5.15-0", - 24: "3.5.15-0", - 25: "3.5.15-0", - 26: "3.5.15-0", - 27: "3.5.15-0", - 28: "3.5.15-0", - 29: "3.5.15-0", - 30: "3.5.15-0", - 31: "3.5.15-0", + 22: "3.5.16-0", + 23: "3.5.16-0", + 24: "3.5.16-0", + 25: "3.5.16-0", + 26: "3.5.16-0", + 27: "3.5.16-0", + 28: "3.5.16-0", + 29: "3.5.16-0", } // KubeadmCertsClusterRoleName sets the name for the ClusterRole that allows diff --git a/hack/lib/etcd.sh b/hack/lib/etcd.sh index affff4da3e91b..b1a185a571aeb 100755 --- a/hack/lib/etcd.sh +++ b/hack/lib/etcd.sh @@ -16,7 +16,7 @@ # A set of helpers for starting/running etcd for tests -ETCD_VERSION=${ETCD_VERSION:-3.5.15} +ETCD_VERSION=${ETCD_VERSION:-3.5.16} ETCD_HOST=${ETCD_HOST:-127.0.0.1} ETCD_PORT=${ETCD_PORT:-2379} # This is intentionally not called ETCD_LOG_LEVEL: diff --git a/staging/src/k8s.io/sample-apiserver/artifacts/example/deployment.yaml b/staging/src/k8s.io/sample-apiserver/artifacts/example/deployment.yaml index 859bb90c80df9..eee160a6d182e 100644 --- a/staging/src/k8s.io/sample-apiserver/artifacts/example/deployment.yaml +++ b/staging/src/k8s.io/sample-apiserver/artifacts/example/deployment.yaml @@ -26,4 +26,4 @@ spec: imagePullPolicy: Never args: [ "--etcd-servers=http://localhost:2379" ] - name: etcd - image: gcr.io/etcd-development/etcd:v3.5.15 \ No newline at end of file + image: gcr.io/etcd-development/etcd:v3.5.16 diff --git a/test/utils/image/manifest.go b/test/utils/image/manifest.go index a27bea25bd656..4e4118876e15f 100644 --- a/test/utils/image/manifest.go +++ b/test/utils/image/manifest.go @@ -242,7 +242,7 @@ func initImageConfigs(list RegistryList) (map[ImageID]Config, map[ImageID]Config configs[CudaVectorAdd] = Config{list.PromoterE2eRegistry, "cuda-vector-add", "1.0"} configs[CudaVectorAdd2] = Config{list.PromoterE2eRegistry, "cuda-vector-add", "2.3"} configs[DistrolessIptables] = Config{list.BuildImageRegistry, "distroless-iptables", "v0.5.9"} - configs[Etcd] = Config{list.GcEtcdRegistry, "etcd", "3.5.15-0"} + configs[Etcd] = Config{list.GcEtcdRegistry, "etcd", "3.5.16-0"} configs[Httpd] = Config{list.PromoterE2eRegistry, "httpd", "2.4.38-4"} configs[HttpdNew] = Config{list.PromoterE2eRegistry, "httpd", "2.4.39-4"} configs[InvalidRegistryImage] = Config{list.InvalidRegistry, "alpine", "3.1"} From 99b90640b6989669197545ea42906d5b71d97840 Mon Sep 17 00:00:00 2001 From: bzsuni Date: Wed, 11 Sep 2024 10:35:07 +0800 Subject: [PATCH 2/2] Build etcd image v3.5.16 Signed-off-by: bzsuni --- build/dependencies.yaml | 4 ++-- cluster/images/etcd/Makefile | 8 ++++---- cluster/images/etcd/migrate/options.go | 2 +- test/e2e/framework/providers/gcp.go | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/dependencies.yaml b/build/dependencies.yaml index 777ee41e6b49b..2dbad32dd4f24 100644 --- a/build/dependencies.yaml +++ b/build/dependencies.yaml @@ -82,7 +82,7 @@ dependencies: match: configs\[Etcd\] = Config{list\.GcEtcdRegistry, "etcd", "\d+\.\d+.\d+(-(alpha|beta|rc).\d+)?(-\d+)?"} - name: "etcd-image" - version: 3.5.15 + version: 3.5.16 refPaths: - path: cluster/images/etcd/Makefile match: BUNDLED_ETCD_VERSIONS\?|LATEST_ETCD_VERSION\? @@ -111,7 +111,7 @@ dependencies: # From https://github.com/etcd-io/etcd/blob/main/Makefile - name: "golang: etcd release version" - version: 1.21.12 # https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.5.md + version: 1.22.7 # https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.5.md refPaths: - path: cluster/images/etcd/Makefile match: 'GOLANG_VERSION := \d+.\d+(alpha|beta|rc)?\.?(\d+)?' diff --git a/cluster/images/etcd/Makefile b/cluster/images/etcd/Makefile index b492076ee5f80..bbbf89cdbff4d 100644 --- a/cluster/images/etcd/Makefile +++ b/cluster/images/etcd/Makefile @@ -15,7 +15,7 @@ # Build the etcd image # # Usage: -# [BUNDLED_ETCD_VERSIONS=3.4.18 3.5.15] [REGISTRY=registry.k8s.io] [ARCH=amd64] [BASEIMAGE=busybox] make (build|push) +# [BUNDLED_ETCD_VERSIONS=3.4.18 3.5.16] [REGISTRY=registry.k8s.io] [ARCH=amd64] [BASEIMAGE=busybox] make (build|push) # # The image contains different etcd versions to simplify # upgrades. Thus be careful when removing any versions from here. @@ -26,10 +26,10 @@ # Except from etcd-$(version) and etcdctl-$(version) binaries, we also # need etcd and etcdctl binaries for backward compatibility reasons. # That binary will be set to the last version from $(BUNDLED_ETCD_VERSIONS). -BUNDLED_ETCD_VERSIONS?=3.4.18 3.5.15 +BUNDLED_ETCD_VERSIONS?=3.4.18 3.5.16 # LATEST_ETCD_VERSION identifies the most recent etcd version available. -LATEST_ETCD_VERSION?=3.5.15 +LATEST_ETCD_VERSION?=3.5.16 # REVISION provides a version number for this image and all it's bundled # artifacts. It should start at zero for each LATEST_ETCD_VERSION and increment @@ -83,7 +83,7 @@ endif # This option is for running docker manifest command export DOCKER_CLI_EXPERIMENTAL := enabled # golang version should match the golang version of the official build from https://github.com/etcd-io/etcd/releases. -GOLANG_VERSION := 1.21.12 +GOLANG_VERSION := 1.22.7 GOARM?=7 TEMP_DIR:=$(shell mktemp -d) diff --git a/cluster/images/etcd/migrate/options.go b/cluster/images/etcd/migrate/options.go index e4e6bce464ea5..5bd22d0c03632 100644 --- a/cluster/images/etcd/migrate/options.go +++ b/cluster/images/etcd/migrate/options.go @@ -28,7 +28,7 @@ import ( ) var ( - supportedEtcdVersions = []string{"3.4.18", "3.5.15"} + supportedEtcdVersions = []string{"3.4.18", "3.5.16"} ) const ( diff --git a/test/e2e/framework/providers/gcp.go b/test/e2e/framework/providers/gcp.go index 9f8b4948bf0fe..67fa9dc1fc5b0 100644 --- a/test/e2e/framework/providers/gcp.go +++ b/test/e2e/framework/providers/gcp.go @@ -26,7 +26,7 @@ import ( e2enode "k8s.io/kubernetes/test/e2e/framework/node" ) -const etcdImage = "3.5.15-0" +const etcdImage = "3.5.16-0" // EtcdUpgrade upgrades etcd on GCE. func EtcdUpgrade(targetStorage, targetVersion string) error {