From c45cd1faab39d505e289148a43b3d57b7545a892 Mon Sep 17 00:00:00 2001
From: liuxu <liuxu156@huawei.com>
Date: Thu, 28 Nov 2024 17:23:38 +0800
Subject: [PATCH] adapt go version

Signed-off-by: liuxu <liuxu156@huawei.com>
---
 .go-version                     |  2 +-
 build/build-image/cross/VERSION |  2 +-
 build/common.sh                 |  2 +-
 build/dependencies.yaml         |  6 ++--
 staging/publishing/rules.yaml   | 62 ++++++++++++++++-----------------
 test/images/Makefile            |  2 +-
 6 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/.go-version b/.go-version
index 6e83421e4fd..3d8ac637188 100644
--- a/.go-version
+++ b/.go-version
@@ -1 +1 @@
-1.21.6
\ No newline at end of file
+1.21.4
\ No newline at end of file
diff --git a/build/build-image/cross/VERSION b/build/build-image/cross/VERSION
index 5d4ae206a18..8ac11054699 100644
--- a/build/build-image/cross/VERSION
+++ b/build/build-image/cross/VERSION
@@ -1 +1 @@
-v1.29.0-go1.21.6-bullseye.0
+v1.29.0-go1.21.4-bullseye.0
diff --git a/build/common.sh b/build/common.sh
index bd6a01a2074..da083d18ceb 100755
--- a/build/common.sh
+++ b/build/common.sh
@@ -97,7 +97,7 @@ readonly KUBE_CONTAINER_RSYNC_PORT=8730
 
 # These are the default versions (image tags) for their respective base images.
 readonly __default_distroless_iptables_version=v0.4.4
-readonly __default_go_runner_version=v2.3.1-go1.21.6-bookworm.0
+readonly __default_go_runner_version=v2.3.1-go1.21.4-bookworm.0
 readonly __default_setcap_version=bookworm-v1.0.0
 
 # These are the base images for the Docker-wrapped binaries.
diff --git a/build/dependencies.yaml b/build/dependencies.yaml
index 3a17f6b4bf5..9da3bee180a 100644
--- a/build/dependencies.yaml
+++ b/build/dependencies.yaml
@@ -118,7 +118,7 @@ dependencies:
 
   # Golang
   - name: "golang: upstream version"
-    version: 1.21.6
+    version: 1.21.4
     refPaths:
     - path: .go-version
     - path: build/build-image/cross/VERSION
@@ -140,7 +140,7 @@ dependencies:
       match: minimum_go_version=go([0-9]+\.[0-9]+)
 
   - name: "registry.k8s.io/kube-cross: dependents"
-    version: v1.29.0-go1.21.6-bullseye.0
+    version: v1.29.0-go1.21.4-bullseye.0
     refPaths:
     - path: build/build-image/cross/VERSION
 
@@ -186,7 +186,7 @@ dependencies:
       match: configs\[DistrolessIptables\] = Config{list\.BuildImageRegistry, "distroless-iptables", "v([0-9]+)\.([0-9]+)\.([0-9]+)"}
 
   - name: "registry.k8s.io/go-runner: dependents"
-    version: v2.3.1-go1.21.6-bookworm.0
+    version: v2.3.1-go1.21.4-bookworm.0
     refPaths:
     - path: build/common.sh
       match: __default_go_runner_version=
diff --git a/staging/publishing/rules.yaml b/staging/publishing/rules.yaml
index 62071c41ee2..f1dae4f5031 100644
--- a/staging/publishing/rules.yaml
+++ b/staging/publishing/rules.yaml
@@ -31,7 +31,7 @@ rules:
       dirs:
       - staging/src/k8s.io/code-generator
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     source:
       branch: release-1.29
       dirs:
@@ -68,7 +68,7 @@ rules:
       dirs:
       - staging/src/k8s.io/apimachinery
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     source:
       branch: release-1.29
       dirs:
@@ -121,7 +121,7 @@ rules:
       dirs:
       - staging/src/k8s.io/api
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -207,7 +207,7 @@ rules:
       go build -mod=mod ./...
       go test -mod=mod ./...
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -289,7 +289,7 @@ rules:
       dirs:
       - staging/src/k8s.io/component-base
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -369,7 +369,7 @@ rules:
       dirs:
       - staging/src/k8s.io/component-helpers
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -425,7 +425,7 @@ rules:
       dirs:
       - staging/src/k8s.io/kms
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -519,7 +519,7 @@ rules:
       dirs:
       - staging/src/k8s.io/apiserver
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -641,7 +641,7 @@ rules:
       dirs:
       - staging/src/k8s.io/kube-aggregator
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -791,7 +791,7 @@ rules:
       # assumes GO111MODULE=on
       go build -mod=mod .
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -918,7 +918,7 @@ rules:
       # assumes GO111MODULE=on
       go build -mod=mod .
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -1052,7 +1052,7 @@ rules:
     required-packages:
     - k8s.io/code-generator
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -1151,7 +1151,7 @@ rules:
       dirs:
       - staging/src/k8s.io/metrics
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -1233,7 +1233,7 @@ rules:
       dirs:
       - staging/src/k8s.io/cli-runtime
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: api
       branch: release-1.29
@@ -1323,7 +1323,7 @@ rules:
       dirs:
       - staging/src/k8s.io/sample-cli-plugin
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: api
       branch: release-1.29
@@ -1414,7 +1414,7 @@ rules:
       dirs:
       - staging/src/k8s.io/kube-proxy
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -1461,7 +1461,7 @@ rules:
       dirs:
       - staging/src/k8s.io/cri-api
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     source:
       branch: release-1.29
       dirs:
@@ -1556,7 +1556,7 @@ rules:
       dirs:
       - staging/src/k8s.io/kubelet
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -1654,7 +1654,7 @@ rules:
       dirs:
       - staging/src/k8s.io/kube-scheduler
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -1764,7 +1764,7 @@ rules:
       dirs:
       - staging/src/k8s.io/controller-manager
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: api
       branch: release-1.29
@@ -1898,7 +1898,7 @@ rules:
       dirs:
       - staging/src/k8s.io/cloud-provider
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: api
       branch: release-1.29
@@ -2046,7 +2046,7 @@ rules:
       dirs:
       - staging/src/k8s.io/kube-controller-manager
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -2128,7 +2128,7 @@ rules:
       dirs:
       - staging/src/k8s.io/cluster-bootstrap
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -2196,7 +2196,7 @@ rules:
       dirs:
       - staging/src/k8s.io/csi-translation-lib
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: api
       branch: release-1.29
@@ -2239,7 +2239,7 @@ rules:
       dirs:
       - staging/src/k8s.io/mount-utils
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     source:
       branch: release-1.29
       dirs:
@@ -2378,7 +2378,7 @@ rules:
       dirs:
       - staging/src/k8s.io/legacy-cloud-providers
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: api
       branch: release-1.29
@@ -2520,7 +2520,7 @@ rules:
       dirs:
       - staging/src/k8s.io/kubectl
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: api
       branch: release-1.29
@@ -2638,7 +2638,7 @@ rules:
       dirs:
       - staging/src/k8s.io/pod-security-admission
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: api
       branch: release-1.29
@@ -2735,7 +2735,7 @@ rules:
       dirs:
       - staging/src/k8s.io/dynamic-resource-allocation
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: apimachinery
       branch: release-1.29
@@ -2787,7 +2787,7 @@ rules:
       dirs:
       - staging/src/k8s.io/endpointslice
   - name: release-1.29
-    go: 1.21.6
+    go: 1.21.4
     dependencies:
     - repository: api
       branch: release-1.29
@@ -2803,4 +2803,4 @@ rules:
       - staging/src/k8s.io/endpointslice
 recursive-delete-patterns:
 - '*/.gitattributes'
-default-go-version: 1.21.6
+default-go-version: 1.21.4
diff --git a/test/images/Makefile b/test/images/Makefile
index 92e854649d5..6fb6d7c3e38 100644
--- a/test/images/Makefile
+++ b/test/images/Makefile
@@ -16,7 +16,7 @@ REGISTRY ?= registry.k8s.io/e2e-test-images
 GOARM ?= 7
 DOCKER_CERT_BASE_PATH ?=
 QEMUVERSION=v5.1.0-2
-GOLANG_VERSION=1.21.6
+GOLANG_VERSION=1.21.4
 export
 
 ifndef WHAT
-- 
2.43.0

