Skip to content

Commit 99e9a26

Browse files
authored
Merge pull request #11633 from sbueringer/pr-bump-cr-ct
⚠️ Bump to controller-runtime v0.20 & controler-tools v0.17
2 parents 1d2fde5 + 5c87545 commit 99e9a26

File tree

74 files changed

+365
-470
lines changed

Some content is hidden

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

74 files changed

+365
-470
lines changed

.golangci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
run:
22
timeout: 10m
3-
go: "1.22"
3+
go: "1.23"
44
build-tags:
55
- tools
66
- e2e
@@ -310,11 +310,6 @@ issues:
310310
- stylecheck
311311
path: (framework|e2e)/.*.go
312312
text: should not use dot imports
313-
- linters:
314-
- revive
315-
- stylecheck
316-
path: util/defaulting/defaulting.go
317-
text: should not use dot imports
318313
# Large parts of this file are duplicate from k/k. Let's ignore "emptyStringTest" to reduce the noise in diffs
319314
# and to avoid making mistakes by diverging from upstream just because of this purely stylistic linter finding.
320315
- linters:

Makefile

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ SHELL:=/usr/bin/env bash
2323
#
2424
# Go.
2525
#
26-
GO_VERSION ?= 1.22.10
27-
GO_DIRECTIVE_VERSION ?= 1.22.0
26+
GO_VERSION ?= 1.23.0
27+
GO_DIRECTIVE_VERSION ?= 1.23.0
2828
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
2929

30+
# Ensure correct toolchain is used
31+
GOTOOLCHAIN = go$(GO_VERSION)
32+
export GOTOOLCHAIN
33+
3034
# Use GOPROXY environment variable if set
3135
GOPROXY := $(shell go env GOPROXY)
3236
ifeq ($(GOPROXY),)
@@ -101,12 +105,12 @@ KUSTOMIZE_BIN := kustomize
101105
KUSTOMIZE := $(abspath $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER))
102106
KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v5
103107

104-
SETUP_ENVTEST_VER := release-0.19
108+
SETUP_ENVTEST_VER := release-0.20
105109
SETUP_ENVTEST_BIN := setup-envtest
106110
SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
107111
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest
108112

109-
CONTROLLER_GEN_VER := v0.16.1
113+
CONTROLLER_GEN_VER := v0.17.0
110114
CONTROLLER_GEN_BIN := controller-gen
111115
CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER))
112116
CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen
@@ -116,7 +120,7 @@ GOTESTSUM_BIN := gotestsum
116120
GOTESTSUM := $(abspath $(TOOLS_BIN_DIR)/$(GOTESTSUM_BIN)-$(GOTESTSUM_VER))
117121
GOTESTSUM_PKG := gotest.tools/gotestsum
118122

119-
CONVERSION_GEN_VER := v0.31.0
123+
CONVERSION_GEN_VER := v0.32.0
120124
CONVERSION_GEN_BIN := conversion-gen
121125
# We are intentionally using the binary without version suffix, to avoid the version
122126
# in generated files.
@@ -182,7 +186,7 @@ TRIAGE_PARTY_VERSION ?= v1.6.0
182186
CONVERSION_VERIFIER_BIN := conversion-verifier
183187
CONVERSION_VERIFIER := $(abspath $(TOOLS_BIN_DIR)/$(CONVERSION_VERIFIER_BIN))
184188

185-
OPENAPI_GEN_VER := dc4e619 # main branch as of 22.04.2024
189+
OPENAPI_GEN_VER := 2c72e55 # main branch as of 03.01.2025
186190
OPENAPI_GEN_BIN := openapi-gen
187191
# We are intentionally using the binary without version suffix, to avoid the version
188192
# in generated files.
@@ -458,8 +462,6 @@ generate-go-conversions-core-api: $(CONVERSION_GEN) ## Generate conversions go c
458462
generate-go-conversions-core-exp: $(CONVERSION_GEN) ## Generate conversions go code for core exp
459463
$(MAKE) clean-generated-conversions SRC_DIRS="./internal/apis/core/exp/v1alpha3,./internal/apis/core/exp/addons/v1alpha3,./internal/apis/core/exp/v1alpha4,./internal/apis/core/exp/addons/v1alpha4"
460464
$(CONVERSION_GEN) \
461-
--extra-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3 \
462-
--extra-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4 \
463465
--output-file=zz_generated.conversion.go \
464466
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
465467
./internal/apis/core/exp/v1alpha3 \
@@ -505,10 +507,6 @@ generate-go-conversions-kubeadm-bootstrap: $(CONVERSION_GEN) ## Generate convers
505507
generate-go-conversions-kubeadm-control-plane: $(CONVERSION_GEN) ## Generate conversions go code for kubeadm control plane
506508
$(MAKE) clean-generated-conversions SRC_DIRS="./internal/apis/controlplane/kubeadm"
507509
$(CONVERSION_GEN) \
508-
--extra-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3 \
509-
--extra-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4 \
510-
--extra-dirs=sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha3 \
511-
--extra-dirs=sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha4 \
512510
--output-file=zz_generated.conversion.go \
513511
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
514512
./internal/apis/controlplane/kubeadm/v1alpha3 \
@@ -533,7 +531,7 @@ generate-go-conversions-test-extension: $(CONVERSION_GEN) ## Generate conversion
533531

534532
# The tmp/sigs.k8s.io/cluster-api symlink is a workaround to make this target run outside of GOPATH
535533
.PHONY: generate-go-openapi
536-
generate-go-openapi: $(OPENAPI_GEN) $(CONTROLLER_GEN) ## Generate openapi go code for runtime SDK
534+
generate-go-openapi: $(OPENAPI_GEN) ## Generate openapi go code for runtime SDK
537535
@mkdir -p ./tmp/sigs.k8s.io; ln -s $(ROOT_DIR) ./tmp/sigs.k8s.io/; cd ./tmp; \
538536
for pkg in "api/v1beta1" "$(EXP_DIR)/runtime/hooks/api/v1alpha1"; do \
539537
(cd ../ && $(MAKE) clean-generated-openapi-definitions SRC_DIRS="./$${pkg}"); \

Tiltfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ def load_provider_tiltfiles():
184184

185185
tilt_helper_dockerfile_header = """
186186
# Tilt image
187-
FROM golang:1.22.10 as tilt-helper
187+
FROM golang:1.23.0 as tilt-helper
188188
# Install delve. Note this should be kept in step with the Go release minor version.
189-
RUN go install github.com/go-delve/delve/cmd/dlv@v1.22
189+
RUN go install github.com/go-delve/delve/cmd/dlv@v1.23
190190
# Support live reloading with Tilt
191191
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/restart.sh && \
192192
wget --output-document /start.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/start.sh && \
@@ -195,7 +195,7 @@ RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com
195195
"""
196196

197197
tilt_dockerfile_header = """
198-
FROM golang:1.22.10 as tilt
198+
FROM golang:1.23.0 as tilt
199199
WORKDIR /
200200
COPY --from=tilt-helper /process.txt .
201201
COPY --from=tilt-helper /start.sh .

bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap/kubeadm/config/rbac/role.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ rules:
1717
- patch
1818
- update
1919
- watch
20+
- apiGroups:
21+
- ""
22+
resources:
23+
- events
24+
verbs:
25+
- create
26+
- patch
2027
- apiGroups:
2128
- authentication.k8s.io
2229
resources:
@@ -57,10 +64,3 @@ rules:
5764
- get
5865
- list
5966
- watch
60-
- apiGroups:
61-
- ""
62-
resources:
63-
- events
64-
verbs:
65-
- create
66-
- patch

bootstrap/kubeadm/internal/webhooks/kubeadmconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
func (webhook *KubeadmConfig) SetupWebhookWithManager(mgr ctrl.Manager) error {
3434
return ctrl.NewWebhookManagedBy(mgr).
3535
For(&bootstrapv1.KubeadmConfig{}).
36-
WithDefaulter(webhook).
36+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
3737
WithValidator(webhook).
3838
Complete()
3939
}

bootstrap/kubeadm/internal/webhooks/kubeadmconfigtemplate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
func (webhook *KubeadmConfigTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
3333
return ctrl.NewWebhookManagedBy(mgr).
3434
For(&bootstrapv1.KubeadmConfigTemplate{}).
35-
WithDefaulter(webhook).
35+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
3636
WithValidator(webhook).
3737
Complete()
3838
}

cloudbuild-nightly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ options:
55
substitution_option: ALLOW_LOOSE
66
machineType: 'E2_HIGHCPU_8'
77
steps:
8-
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud@sha256:de53ba7cd20326776a00adb065430a8bb51beaf24876ffcbd4e8f71b74dbc22d' # v20240210-29014a6e3a
8+
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud@sha256:4e830b673791d5595719bc6c4ca62dce3746b4e20d749e45004254bc6ef0a140' # v20250116-2a05ea7e3d
99
entrypoint: make
1010
env:
1111
- DOCKER_CLI_EXPERIMENTAL=enabled

cloudbuild.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ options:
55
substitution_option: ALLOW_LOOSE
66
machineType: 'E2_HIGHCPU_8'
77
steps:
8-
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud@sha256:de53ba7cd20326776a00adb065430a8bb51beaf24876ffcbd4e8f71b74dbc22d' # v20240210-29014a6e3a
8+
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud@sha256:4e830b673791d5595719bc6c4ca62dce3746b4e20d749e45004254bc6ef0a140' # v20250116-2a05ea7e3d
99
entrypoint: make
1010
env:
1111
- DOCKER_CLI_EXPERIMENTAL=enabled
@@ -17,4 +17,4 @@ substitutions:
1717
# _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and
1818
# can be used as a substitution
1919
_GIT_TAG: '12345'
20-
_PULL_BASE_REF: 'dev'
20+
_PULL_BASE_REF: 'dev'

cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/clusterctl/config/manifest/clusterctl-api.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_clusters.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machinedrainrules.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machinepools.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machines.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machinesets.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/ipam.cluster.x-k8s.io_ipaddressclaims.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/ipam.cluster.x-k8s.io_ipaddresses.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)