Skip to content

Commit c0e46ff

Browse files
authored
ci: update all with go (#21213)
* add update all go script * add update all make target * add update all make target * standardize the component name for look up * standardize amd amd component name * rename all hack update go code to match component name to standardize * delete extra folder * update makefile with new standard filenames * update component name amd * fix amd gpu name * skip amd for now till broken * fix cilium helm update * standard name for cloud spanner emulator * standard crio name * set max to 100 * delete old folder * skip docsy for update all * return error if fail to apply * docsy versoin * update files with go-github * update file names * move all make targets to same location * standard name for golang comp * skip istio addon * skip kicbase version since it is not related * skip kubeadm constant too * skip kubernetes version too * run components that dont support before/after * update kubeadm constant * skip kubeadm constant on non linux * add kubernetes_versions_list to not support before/after * list preload version as one of the internal jobs * list preload version as one of the internal jobs * simpllify the code * use log for printing * add boiler plates * add gh workflow
1 parent 7ce5142 commit c0e46ff

File tree

56 files changed

+303
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+303
-89
lines changed

.github/workflows/update-all.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "update-all"
2+
on:
3+
workflow_dispatch:
4+
env:
5+
GOPROXY: https://proxy.golang.org
6+
GO_VERSION: '1.24.0'
7+
permissions:
8+
contents: read
9+
jobs:
10+
update-all:
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
14+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
15+
with:
16+
go-version: ${{env.GO_VERSION}}
17+
- name: Bump versions
18+
id: bumpVersions
19+
run: |
20+
MAKEALL_OUTPUT=$(make _update-all)
21+
echo "changes<<EOF" >> "$GITHUB_OUTPUT"
22+
echo "$MAKEALL_OUTPUT" >> "$GITHUB_OUTPUT"
23+
echo "$(git status --porcelain)" >> "$GITHUB_OUTPUT"
24+
echo "EOF" >> "$GITHUB_OUTPUT"
25+
- name: Create PR
26+
id: createPR
27+
if: ${{ steps.bumpVersions.outputs.changes != '' }}
28+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
29+
with:
30+
token: ${{ secrets.MINIKUBE_BOT_PAT }}
31+
commit-message: 'Kicbase/ISO: Update dependency versions'
32+
committer: minikube-bot <[email protected]>
33+
author: minikube-bot <[email protected]>
34+
branch: bump_iso_image_versions
35+
branch-suffix: short-commit-hash
36+
push-to-fork: minikube-bot/minikube
37+
base: master
38+
delete-branch: true
39+
title: 'deubg pr: update all dependencies'
40+
body: |
41+
Changelog:
42+
${{ steps.bumpVersions.outputs.changelog }}

.github/workflows/update-amd-gpu-device-plugin-version.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
- name: Bump amd-gpu-device-plugin version
2222
id: bumpAmdDevicePlugin
2323
run: |
24-
echo "OLD_VERSION=$(DEP=amd-gpu-device-plugin make get-dependency-version)" >> "$GITHUB_OUTPUT"
25-
make update-amd-gpu-device-plugin-version
26-
echo "NEW_VERSION=$(DEP=amd-gpu-device-plugin make get-dependency-version)" >> "$GITHUB_OUTPUT"
24+
echo "OLD_VERSION=$(DEP=amd-device-gpu-plugin make get-dependency-version)" >> "$GITHUB_OUTPUT"
25+
make update-amd-device-plugin-version
26+
echo "NEW_VERSION=$(DEP=amd-device-gpu-plugin make get-dependency-version)" >> "$GITHUB_OUTPUT"
2727
# The following is to support multiline with GITHUB_OUTPUT, see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
2828
echo "changes<<EOF" >> "$GITHUB_OUTPUT"
2929
echo "$(git status --porcelain)" >> "$GITHUB_OUTPUT"
@@ -45,4 +45,4 @@ jobs:
4545
body: |
4646
The [k8s-device-plugin](https://github.com/ROCm/k8s-device-plugin) project released a new k8s-device-plugin image
4747
48-
This PR was auto-generated by `make update-amd-gpu-device-plugin-version` using [update-amd-gpu-device-plugin-version.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows/update-amd-gpu-device-plugin-version.yml) CI Workflow.
48+
This PR was auto-generated by `make update-amd-device-plugin-version` using [update-amd-gpu-device-plugin-version.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows/update-amd-gpu-device-plugin-version.yml) CI Workflow.

.github/workflows/update-cloud-spanner-emulator-version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
- name: Bump cloud-spanner-emulator version
2222
id: bumpCloudSpannerEmulator
2323
run: |
24-
echo "OLD_VERSION=$(DEP=cloud-spanner make get-dependency-version)" >> "$GITHUB_OUTPUT"
24+
echo "OLD_VERSION=$(DEP=cloud-spanner-emulator make get-dependency-version)" >> "$GITHUB_OUTPUT"
2525
make update-cloud-spanner-emulator-version
26-
echo "NEW_VERSION=$(DEP=cloud-spanner make get-dependency-version)" >> "$GITHUB_OUTPUT"
26+
echo "NEW_VERSION=$(DEP=cloud-spanner-emulator make get-dependency-version)" >> "$GITHUB_OUTPUT"
2727
# The following is to support multiline with GITHUB_OUTPUT, see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
2828
echo "changes<<EOF" >> "$GITHUB_OUTPUT"
2929
echo "$(git status --porcelain)" >> "$GITHUB_OUTPUT"

.github/workflows/update-golang-version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
- name: Bump Golang Versions
2222
id: bumpGolang
2323
run: |
24-
echo "OLD_VERSION=$(DEP=go make get-dependency-version)" >> "$GITHUB_OUTPUT"
24+
echo "OLD_VERSION=$(DEP=golang make get-dependency-version)" >> "$GITHUB_OUTPUT"
2525
make update-golang-version
26-
echo "NEW_VERSION=$(DEP=go make get-dependency-version)" >> "$GITHUB_OUTPUT"
26+
echo "NEW_VERSION=$(DEP=golang make get-dependency-version)" >> "$GITHUB_OUTPUT"
2727
# The following is to support multiline with GITHUB_OUTPUT, see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
2828
echo "changes<<EOF" >> "$GITHUB_OUTPUT"
2929
echo "$(git status --porcelain)" >> "$GITHUB_OUTPUT"

Makefile

Lines changed: 72 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ RPM_REVISION ?= 0
3535

3636
# used by hack/jenkins/release_build_and_upload.sh and KVM_BUILD_IMAGE, see also BUILD_IMAGE below
3737
# update this only by running `make update-golang-version`
38-
GO_VERSION ?= 1.24.0
38+
GO_VERSION ?= 1.24.5
3939
# set GOTOOLCHAIN to GO_VERSION to override any toolchain version specified in
4040
# go.mod (ref: https://go.dev/doc/toolchain#GOTOOLCHAIN)
4141
export GOTOOLCHAIN := go$(GO_VERSION)
4242
# update this only by running `make update-golang-version`
43-
GO_K8S_VERSION_PREFIX ?= v1.33.0
43+
GO_K8S_VERSION_PREFIX ?= v1.34.0
4444

4545
# replace "x.y.0" => "x.y". kube-cross and go.dev/dl use different formats for x.y.0 go versions
4646
KVM_GO_VERSION ?= $(GO_VERSION:.0=)
@@ -1033,28 +1033,6 @@ help:
10331033
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
10341034

10351035

1036-
1037-
.PHONY: update-golang-version
1038-
update-golang-version:
1039-
cd hack && go run update/golang_version/update_golang_version.go
1040-
1041-
.PHONY: update-kubernetes-version
1042-
update-kubernetes-version:
1043-
cd hack && go run update/kubernetes_version/update_kubernetes_version.go
1044-
1045-
.PHONY: update-golint-version
1046-
update-golint-version:
1047-
cd hack && go run update/golint_version/update_golint_version.go
1048-
1049-
.PHONY: update-preload-version
1050-
update-preload-version:
1051-
cd hack && go run update/preload_version/update_preload_version.go
1052-
1053-
.PHONY: update-kubeadm-constants
1054-
update-kubeadm-constants:
1055-
cd hack && go run update/kubeadm_constants/update_kubeadm_constants.go
1056-
gofmt -w pkg/minikube/constants/constants_kubeadm_images.go
1057-
10581036
.PHONY: stress
10591037
stress: ## run the stress tests
10601038
go test -test.v -test.timeout=2h ./test/stress -loops=10 | tee "./out/testout_$(COMMIT_SHORT).txt"
@@ -1071,176 +1049,202 @@ cpu-benchmark-autopause: ## run the cpu usage auto-pause benchmark
10711049
time-to-k8s-benchmark:
10721050
./hack/benchmark/time-to-k8s/time-to-k8s.sh
10731051

1052+
.PHONY: update-golang-version
1053+
update-golang-version:
1054+
cd hack && go run update/golang_version/golang_version.go
1055+
1056+
.PHONY: update-kubernetes-version
1057+
update-kubernetes-version:
1058+
cd hack && go run update/kubernetes_version/kubernetes_version.go
1059+
1060+
.PHONY: update-golint-version
1061+
update-golint-version:
1062+
cd hack && go run update/golint_version/golint_version.go
1063+
1064+
.PHONY: update-preload-version
1065+
update-preload-version:
1066+
cd hack && go run update/preload_version/preload_version.go
1067+
1068+
.PHONY: update-kubeadm-constants
1069+
update-kubeadm-constants:
1070+
cd hack && go run update/kubeadm_constants/kubeadm_constants.go
1071+
gofmt -w pkg/minikube/constants/constants_kubeadm_images.go
10741072
.PHONY: update-gopogh-version
10751073
update-gopogh-version: ## update gopogh version
1076-
cd hack && go run update/gopogh_version/update_gopogh_version.go
1074+
cd hack && go run update/gopogh_version/gopogh_version.go
10771075

10781076
.PHONY: update-gotestsum-version
10791077
update-gotestsum-version:
1080-
cd hack && go run update/gotestsum_version/update_gotestsum_version.go
1078+
cd hack && go run update/gotestsum_version/gotestsum_version.go
10811079

10821080
.PHONY: update-gh-version
10831081
update-gh-version:
1084-
cd hack && go run update/gh_version/update_gh_version.go
1082+
cd hack && go run update/gh_version/gh_version.go
10851083

10861084
.PHONY: update-docsy-version
10871085
update-docsy-version:
1088-
cd hack && go run update/docsy_version/update_docsy_version.go
1086+
cd hack && go run update/docsy_version/docsy_version.go
10891087

10901088
.PHONY: update-hugo-version
10911089
update-hugo-version:
1092-
cd hack && go run update/hugo_version/update_hugo_version.go
1090+
cd hack && go run update/hugo_version/hugo_version.go
10931091

10941092
.PHONY: update-cloud-spanner-emulator-version
10951093
update-cloud-spanner-emulator-version:
1096-
cd hack && go run update/cloud_spanner_emulator_version/update_cloud_spanner_emulator_version.go
1094+
cd hack && go run update/cloud_spanner_emulator_version/cloud_spanner_emulator_version.go
10971095

10981096
.PHONY: update-containerd-version
10991097
update-containerd-version:
1100-
cd hack && go run update/containerd_version/update_containerd_version.go
1098+
cd hack && go run update/containerd_version/containerd_version.go
11011099

11021100
.PHONY: update-buildkit-version
11031101
update-buildkit-version:
1104-
cd hack && go run update/buildkit_version/update_buildkit_version.go
1102+
cd hack && go run update/buildkit_version/buildkit_version.go
11051103

11061104
.PHONY: update-cri-o-version
11071105
update-cri-o-version:
1108-
cd hack && go run update/cri-o_version/update_cri-o_version.go
1106+
cd hack && go run update/cri_o_version/cri_o_version.go
11091107

11101108
.PHONY: update-crun-version
11111109
update-crun-version:
1112-
cd hack && go run update/crun_version/update_crun_version.go
1110+
cd hack && go run update/crun_version/crun_version.go
11131111

11141112
.PHONY: update-metrics-server-version
11151113
update-metrics-server-version:
1116-
cd hack && go run update/metrics_server_version/update_metrics_server_version.go
1114+
cd hack && go run update/metrics_server_version/metrics_server_version.go
11171115

11181116
.PHONY: update-runc-version
11191117
update-runc-version:
1120-
cd hack && go run update/runc_version/update_runc_version.go
1118+
cd hack && go run update/runc_version/runc_version.go
11211119

11221120
.PHONY: update-docker-version
11231121
update-docker-version:
1124-
cd hack && go run update/docker_version/update_docker_version.go
1122+
cd hack && go run update/docker_version/docker_version.go
11251123

11261124
.PHONY: update-ubuntu-version
11271125
update-ubuntu-version:
1128-
cd hack && go run update/ubuntu_version/update_ubuntu_version.go
1126+
cd hack && go run update/ubuntu_version/ubuntu_version.go
11291127

11301128
.PHONY: update-cni-plugins-version
11311129
update-cni-plugins-version:
1132-
cd hack && go run update/cni_plugins_version/update_cni_plugins_version.go
1130+
cd hack && go run update/cni_plugins_version/cni_plugins_version.go
11331131

11341132
.PHONY: update-gcp-auth-version
11351133
update-gcp-auth-version:
1136-
cd hack && go run update/gcp_auth_version/update_gcp_auth_version.go
1134+
cd hack && go run update/gcp_auth_version/gcp_auth_version.go
11371135

11381136
.PHONY: update-kubernetes-versions-list
11391137
update-kubernetes-versions-list:
1140-
cd hack && go run update/kubernetes_versions_list/update_kubernetes_versions_list.go
1138+
cd hack && go run update/kubernetes_versions_list/kubernetes_versions_list.go
11411139

11421140
.PHONY: update-ingress-version
11431141
update-ingress-version:
1144-
cd hack && go run update/ingress_version/update_ingress_version.go
1142+
cd hack && go run update/ingress_version/ingress_version.go
11451143

11461144
.PHONY: update-flannel-version
11471145
update-flannel-version:
1148-
cd hack && go run update/flannel_version/update_flannel_version.go
1146+
cd hack && go run update/flannel_version/flannel_version.go
11491147

11501148
.PHONY: update-inspektor-gadget-version
11511149
update-inspektor-gadget-version:
1152-
cd hack && go run update/inspektor_gadget_version/update_inspektor_gadget_version.go
1150+
cd hack && go run update/inspektor_gadget_version/inspektor_gadget_version.go
11531151

11541152
.PHONY: update-calico-version
11551153
update-calico-version:
1156-
cd hack && go run update/calico_version/update_calico_version.go
1154+
cd hack && go run update/calico_version/calico_version.go
11571155

11581156
.PHONY: update-cri-dockerd-version
11591157
update-cri-dockerd-version:
1160-
cd hack && go run update/cri_dockerd_version/update_cri_dockerd_version.go
1158+
cd hack && go run update/cri_dockerd_version/cri_dockerd_version.go
11611159

11621160
.PHONY: update-go-github-version
11631161
update-go-github-version:
1164-
cd hack && go run update/go_github_version/update_go_github_version.go
1162+
cd hack && go run update/go_github_version/go_github_version.go
11651163

11661164
.PHONY: update-docker-buildx-version
11671165
update-docker-buildx-version:
1168-
cd hack && go run update/docker_buildx_version/update_docker_buildx_version.go
1166+
cd hack && go run update/docker_buildx_version/docker_buildx_version.go
11691167

11701168
.PHONY: update-nerdctl-version
11711169
update-nerdctl-version:
1172-
cd hack && go run update/nerdctl_version/update_nerdctl_version.go
1170+
cd hack && go run update/nerdctl_version/nerdctl_version.go
11731171

11741172
.PHONY: update-crictl-version
11751173
update-crictl-version:
1176-
cd hack && go run update/crictl_version/update_crictl_version.go
1174+
cd hack && go run update/crictl_version/crictl_version.go
11771175

11781176
.PHONY: update-kindnetd-version
11791177
update-kindnetd-version:
1180-
cd hack && go run update/kindnetd_version/update_kindnetd_version.go
1178+
cd hack && go run update/kindnetd_version/kindnetd_version.go
11811179

11821180
.PHONY: update-istio-operator-version
11831181
update-istio-operator-version:
1184-
cd hack && go run update/istio_operator_version/update_istio_operator_version.go
1182+
cd hack && go run update/istio_operator_version/istio_operator_version.go
11851183

11861184
.PHONY: update-registry-version
11871185
update-registry-version:
1188-
cd hack && go run update/registry_version/update_registry_version.go
1186+
cd hack && go run update/registry_version/registry_version.go
11891187

11901188
.PHONY: update-volcano-version
11911189
update-volcano-version:
1192-
cd hack && go run update/volcano_version/update_volcano_version.go
1190+
cd hack && go run update/volcano_version/volcano_version.go
11931191

11941192
.PHONY: update-kong-version
11951193
update-kong-version:
1196-
cd hack && go run update/kong_version/update_kong_version.go
1194+
cd hack && go run update/kong_version/kong_version.go
11971195

11981196
.PHONY: update-kong-ingress-controller-version
11991197
update-kong-ingress-controller-version:
1200-
cd hack && go run update/kong_ingress_controller_version/update_kong_ingress_controller_version.go
1198+
cd hack && go run update/kong_ingress_controller_version/kong_ingress_controller_version.go
12011199

12021200
.PHONY: update-nvidia-device-plugin-version
12031201
update-nvidia-device-plugin-version:
1204-
cd hack && go run update/nvidia_device_plugin_version/update_nvidia_device_plugin_version.go
1202+
cd hack && go run update/nvidia_device_plugin_version/nvidia_device_plugin_version.go
12051203

1206-
.PHONY: update-amd-gpu-device-plugin-version
1207-
update-amd-gpu-device-plugin-version:
1208-
cd hack && go run update/amd_device_plugin_version/update_amd_device_plugin_version.go
1204+
# for amd gpu
1205+
.PHONY: update-amd-device-plugin-version
1206+
update-amd-device-plugin-version:
1207+
cd hack && go run update/amd_device_gpu_plugin_version/amd_device_gpu_plugin_version.go
12091208

12101209
.PHONY: update-nerdctld-version
12111210
update-nerdctld-version:
1212-
cd hack && go run update/nerdctld_version/update_nerdctld_version.go
1211+
cd hack && go run update/nerdctld_version/nerdctld_version.go
12131212

12141213
.PHONY: update-kubectl-version
12151214
update-kubectl-version:
1216-
cd hack && go run update/kubectl_version/update_kubectl_version.go
1215+
cd hack && go run update/kubectl_version/kubectl_version.go
12171216

12181217
.PHONY: update-site-node-version
12191218
update-site-node-version:
1220-
cd hack && go run update/site_node_version/update_site_node_version.go
1219+
cd hack && go run update/site_node_version/site_node_version.go
12211220

12221221
.PHONY: update-cilium-version
12231222
update-cilium-version:
1224-
cd hack && go run update/cilium_version/update_cilium_version.go
1223+
cd hack && go run update/cilium_version/cilium_version.go
12251224

12261225
.PHONY: update-yakd-version
12271226
update-yakd-version:
1228-
cd hack && go run update/yakd_version/update_yakd_version.go
1227+
cd hack && go run update/yakd_version/yakd_version.go
12291228

12301229
.PHONY: update-kube-registry-proxy-version
12311230
update-kube-registry-proxy-version:
1232-
cd hack && go run update/kube_registry_proxy_version/update_kube_registry_proxy_version.go
1231+
cd hack && go run update/kube_registry_proxy_version/kube_registry_proxy_version.go
12331232

12341233
.PHONY: update-headlamp-version
12351234
update-headlamp-version:
1236-
cd hack && go run update/headlamp_version/update_headlamp_version.go
1235+
cd hack && go run update/headlamp_version/headlamp_version.go
12371236

12381237
.PHONY: update-kube-vip-version
12391238
update-kube-vip-version:
1240-
cd hack && go run update/kube_vip_version/update_kube_vip_version.go
1239+
cd hack && go run update/kube_vip_version/kube_vip_version.go
12411240

12421241
# used by update- Targets to get before/after versions of tools it updates
12431242
# example usage echo "OLD_VERSION=$(DEP=node make get-dependency-version)" >> "$GITHUB_OUTPUT"
12441243
.PHONY: get-dependency-verison
12451244
get-dependency-version:
12461245
@(cd hack && go run update/get_version/get_version.go)
1246+
1247+
# runs update on all hack/update/components only used for debugging purposes, not meant to be used regularly
1248+
.PHONY: _update-all
1249+
_update-all:
1250+
@(cd hack && go run update/update_all/update_all.go)

0 commit comments

Comments
 (0)