Skip to content

Commit 68fdd55

Browse files
sparkles: Add support to k8s 1.31 and upgrade dependencies (#4080)
Add support to k8s 1.31
1 parent e98ff58 commit 68fdd55

File tree

123 files changed

+877
-1447
lines changed

Some content is hidden

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

123 files changed

+877
-1447
lines changed

build/.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ builds:
4747
- darwin_amd64
4848
- darwin_arm64
4949
env:
50-
- KUBERNETES_VERSION=1.30.0
50+
- KUBERNETES_VERSION=1.31.0
5151
- CGO_ENABLED=0
5252

5353
# Only binaries of the form "kubebuilder_${goos}_${goarch}" will be released.

docs/book/src/cronjob-tutorial/testdata/project/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Image URL to use all building/pushing image targets
22
IMG ?= controller:latest
33
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
4-
ENVTEST_K8S_VERSION = 1.30.0
4+
ENVTEST_K8S_VERSION = 1.31.0
55

66
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
77
ifeq (,$(shell go env GOBIN))
@@ -163,8 +163,8 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint
163163

164164
## Tool Versions
165165
KUSTOMIZE_VERSION ?= v5.4.2
166-
CONTROLLER_TOOLS_VERSION ?= v0.15.0
167-
ENVTEST_VERSION ?= release-0.18
166+
CONTROLLER_TOOLS_VERSION ?= v0.16.1
167+
ENVTEST_VERSION ?= release-0.19
168168
GOLANGCI_LINT_VERSION ?= v1.59.1
169169

170170
.PHONY: kustomize

docs/book/src/cronjob-tutorial/testdata/project/api/v1/webhook_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ var _ = BeforeSuite(func() {
7373
// Note that you must have the required binaries setup under the bin directory to perform
7474
// the tests directly. When we run make test it will be setup and used automatically.
7575
BinaryAssetsDirectory: filepath.Join("..", "..", "bin", "k8s",
76-
fmt.Sprintf("1.30.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
76+
fmt.Sprintf("1.31.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
7777

7878
WebhookInstallOptions: envtest.WebhookInstallOptions{
7979
Paths: []string{filepath.Join("..", "..", "config", "webhook")},

docs/book/src/cronjob-tutorial/testdata/project/cmd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func main() {
117117

118118
// Metrics endpoint is enabled in 'config/default/kustomization.yaml'. The Metrics options configure the server.
119119
// More info:
120-
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.18.4/pkg/metrics/server
120+
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.0/pkg/metrics/server
121121
// - https://book.kubebuilder.io/reference/metrics.html
122122
metricsServerOptions := metricsserver.Options{
123123
BindAddress: metricsAddr,
@@ -135,7 +135,7 @@ func main() {
135135
// FilterProvider is used to protect the metrics endpoint with authn/authz.
136136
// These configurations ensure that only authorized users and service accounts
137137
// can access the metrics endpoint. The RBAC are configured in 'config/rbac/kustomization.yaml'. More info:
138-
// https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.18.4/pkg/metrics/filters#WithAuthenticationAndAuthorization
138+
// https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.0/pkg/metrics/filters#WithAuthenticationAndAuthorization
139139
metricsServerOptions.FilterProvider = filters.WithAuthenticationAndAuthorization
140140
}
141141

docs/book/src/cronjob-tutorial/testdata/project/config/crd/bases/batch.tutorial.kubebuilder.io_cronjobs.yaml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.16.1
77
name: cronjobs.batch.tutorial.kubebuilder.io
88
spec:
99
group: batch.tutorial.kubebuilder.io
@@ -860,6 +860,7 @@ spec:
860860
format: int32
861861
type: integer
862862
service:
863+
default: ""
863864
type: string
864865
required:
865866
- port
@@ -966,6 +967,7 @@ spec:
966967
format: int32
967968
type: integer
968969
service:
970+
default: ""
969971
type: string
970972
required:
971973
- port
@@ -1047,6 +1049,8 @@ spec:
10471049
properties:
10481050
name:
10491051
type: string
1052+
request:
1053+
type: string
10501054
required:
10511055
- name
10521056
type: object
@@ -1164,6 +1168,7 @@ spec:
11641168
format: int32
11651169
type: integer
11661170
service:
1171+
default: ""
11671172
type: string
11681173
required:
11691174
- port
@@ -1565,6 +1570,7 @@ spec:
15651570
format: int32
15661571
type: integer
15671572
service:
1573+
default: ""
15681574
type: string
15691575
required:
15701576
- port
@@ -1671,6 +1677,7 @@ spec:
16711677
format: int32
16721678
type: integer
16731679
service:
1680+
default: ""
16741681
type: string
16751682
required:
16761683
- port
@@ -1752,6 +1759,8 @@ spec:
17521759
properties:
17531760
name:
17541761
type: string
1762+
request:
1763+
type: string
17551764
required:
17561765
- name
17571766
type: object
@@ -1869,6 +1878,7 @@ spec:
18691878
format: int32
18701879
type: integer
18711880
service:
1881+
default: ""
18721882
type: string
18731883
required:
18741884
- port
@@ -2284,6 +2294,7 @@ spec:
22842294
format: int32
22852295
type: integer
22862296
service:
2297+
default: ""
22872298
type: string
22882299
required:
22892300
- port
@@ -2390,6 +2401,7 @@ spec:
23902401
format: int32
23912402
type: integer
23922403
service:
2404+
default: ""
23932405
type: string
23942406
required:
23952407
- port
@@ -2471,6 +2483,8 @@ spec:
24712483
properties:
24722484
name:
24732485
type: string
2486+
request:
2487+
type: string
24742488
required:
24752489
- name
24762490
type: object
@@ -2588,6 +2602,7 @@ spec:
25882602
format: int32
25892603
type: integer
25902604
service:
2605+
default: ""
25912606
type: string
25922607
required:
25932608
- port
@@ -2752,13 +2767,10 @@ spec:
27522767
properties:
27532768
name:
27542769
type: string
2755-
source:
2756-
properties:
2757-
resourceClaimName:
2758-
type: string
2759-
resourceClaimTemplateName:
2760-
type: string
2761-
type: object
2770+
resourceClaimName:
2771+
type: string
2772+
resourceClaimTemplateName:
2773+
type: string
27622774
required:
27632775
- name
27642776
type: object
@@ -2834,6 +2846,8 @@ spec:
28342846
type: integer
28352847
type: array
28362848
x-kubernetes-list-type: atomic
2849+
supplementalGroupsPolicy:
2850+
type: string
28372851
sysctls:
28382852
items:
28392853
properties:
@@ -2973,10 +2987,12 @@ spec:
29732987
diskURI:
29742988
type: string
29752989
fsType:
2990+
default: ext4
29762991
type: string
29772992
kind:
29782993
type: string
29792994
readOnly:
2995+
default: false
29802996
type: boolean
29812997
required:
29822998
- diskName
@@ -3336,6 +3352,13 @@ spec:
33363352
required:
33373353
- path
33383354
type: object
3355+
image:
3356+
properties:
3357+
pullPolicy:
3358+
type: string
3359+
reference:
3360+
type: string
3361+
type: object
33393362
iscsi:
33403363
properties:
33413364
chapAuthDiscovery:
@@ -3349,6 +3372,7 @@ spec:
33493372
iqn:
33503373
type: string
33513374
iscsiInterface:
3375+
default: default
33523376
type: string
33533377
lun:
33543378
format: int32
@@ -3597,13 +3621,15 @@ spec:
35973621
image:
35983622
type: string
35993623
keyring:
3624+
default: /etc/ceph/keyring
36003625
type: string
36013626
monitors:
36023627
items:
36033628
type: string
36043629
type: array
36053630
x-kubernetes-list-type: atomic
36063631
pool:
3632+
default: rbd
36073633
type: string
36083634
readOnly:
36093635
type: boolean
@@ -3615,6 +3641,7 @@ spec:
36153641
type: object
36163642
x-kubernetes-map-type: atomic
36173643
user:
3644+
default: admin
36183645
type: string
36193646
required:
36203647
- image
@@ -3623,6 +3650,7 @@ spec:
36233650
scaleIO:
36243651
properties:
36253652
fsType:
3653+
default: xfs
36263654
type: string
36273655
gateway:
36283656
type: string
@@ -3640,6 +3668,7 @@ spec:
36403668
sslEnabled:
36413669
type: boolean
36423670
storageMode:
3671+
default: ThinProvisioned
36433672
type: string
36443673
storagePool:
36453674
type: string

0 commit comments

Comments
 (0)