Skip to content

Commit 4ae6ae0

Browse files
✨ Upgrade to Support k8s 1.29
1 parent b38e393 commit 4ae6ae0

File tree

107 files changed

+4844
-5357
lines changed

Some content is hidden

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

107 files changed

+4844
-5357
lines changed

.github/workflows/test-sample-go.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
name: Run on Ubuntu
1010
runs-on: ubuntu-latest
1111
env:
12-
KIND_K8S_VERSION: v1.28.0
13-
tools_k8s_version: 1.28.0
14-
kind_version: 0.15.0
12+
KIND_K8S_VERSION: v1.29.0
13+
tools_k8s_version: 1.29.0
14+
kind_version: 0.20.0
1515
steps:
1616
- name: Clone the code
1717
uses: actions/checkout@v4

docs/book/src/component-config-tutorial/testdata/project/Makefile

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

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

165165
## Tool Versions
166166
KUSTOMIZE_VERSION ?= v5.2.1
167-
CONTROLLER_TOOLS_VERSION ?= v0.13.0
168-
ENVTEST_VERSION ?= release-0.16
167+
CONTROLLER_TOOLS_VERSION ?= v0.14.0
168+
ENVTEST_VERSION ?= release-0.17
169169
GOLANGCI_LINT_VERSION ?= v1.54.2
170170

171171
.PHONY: kustomize

docs/book/src/component-config-tutorial/testdata/project/config/crd/bases/config.tutorial.kubebuilder.io_projectconfigs.yaml

Lines changed: 100 additions & 74 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.13.0
6+
controller-gen.kubebuilder.io/version: v0.14.0
77
name: projectconfigs.config.tutorial.kubebuilder.io
88
spec:
99
group: config.tutorial.kubebuilder.io
@@ -20,59 +20,71 @@ spec:
2020
description: ProjectConfig is the Schema for the projectconfigs API
2121
properties:
2222
apiVersion:
23-
description: 'APIVersion defines the versioned schema of this representation
24-
of an object. Servers should convert recognized schemas to the latest
25-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23+
description: |-
24+
APIVersion defines the versioned schema of this representation of an object.
25+
Servers should convert recognized schemas to the latest internal value, and
26+
may reject unrecognized values.
27+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
2628
type: string
2729
cacheNamespace:
28-
description: "CacheNamespace if specified restricts the manager's cache
29-
to watch objects in the desired namespace Defaults to all namespaces
30-
\n Note: If a namespace is specified, controllers can still Watch for
31-
a cluster-scoped resource (e.g Node). For namespaced resources the
32-
cache will only hold objects from the desired namespace."
30+
description: |-
31+
CacheNamespace if specified restricts the manager's cache to watch objects in
32+
the desired namespace Defaults to all namespaces
33+
34+
35+
Note: If a namespace is specified, controllers can still Watch for a
36+
cluster-scoped resource (e.g Node). For namespaced resources the cache
37+
will only hold objects from the desired namespace.
3338
type: string
3439
clusterName:
3540
type: string
3641
controller:
37-
description: Controller contains global configuration options for controllers
42+
description: |-
43+
Controller contains global configuration options for controllers
3844
registered within this manager.
3945
properties:
4046
cacheSyncTimeout:
41-
description: CacheSyncTimeout refers to the time limit set to wait
42-
for syncing caches. Defaults to 2 minutes if not set.
47+
description: |-
48+
CacheSyncTimeout refers to the time limit set to wait for syncing caches.
49+
Defaults to 2 minutes if not set.
4350
format: int64
4451
type: integer
4552
groupKindConcurrency:
4653
additionalProperties:
4754
type: integer
48-
description: "GroupKindConcurrency is a map from a Kind to the number
49-
of concurrent reconciliation allowed for that controller. \n When
50-
a controller is registered within this manager using the builder
51-
utilities, users have to specify the type the controller reconciles
52-
in the For(...) call. If the object's kind passed matches one of
53-
the keys in this map, the concurrency for that controller is set
54-
to the number specified. \n The key is expected to be consistent
55-
in form with GroupKind.String(), e.g. ReplicaSet in apps group (regardless
56-
of version) would be `ReplicaSet.apps`."
55+
description: |-
56+
GroupKindConcurrency is a map from a Kind to the number of concurrent reconciliation
57+
allowed for that controller.
58+
59+
60+
When a controller is registered within this manager using the builder utilities,
61+
users have to specify the type the controller reconciles in the For(...) call.
62+
If the object's kind passed matches one of the keys in this map, the concurrency
63+
for that controller is set to the number specified.
64+
65+
66+
The key is expected to be consistent in form with GroupKind.String(),
67+
e.g. ReplicaSet in apps group (regardless of version) would be `ReplicaSet.apps`.
5768
type: object
5869
recoverPanic:
5970
description: RecoverPanic indicates if panics should be recovered.
6071
type: boolean
6172
type: object
6273
gracefulShutDown:
63-
description: GracefulShutdownTimeout is the duration given to runnable
64-
to stop before the manager actually returns on stop. To disable graceful
65-
shutdown, set to time.Duration(0) To use graceful shutdown without timeout,
66-
set to a negative duration, e.G. time.Duration(-1) The graceful shutdown
67-
is skipped for safety reasons in case the leader election lease is lost.
74+
description: |-
75+
GracefulShutdownTimeout is the duration given to runnable to stop before the manager actually returns on stop.
76+
To disable graceful shutdown, set to time.Duration(0)
77+
To use graceful shutdown without timeout, set to a negative duration, e.G. time.Duration(-1)
78+
The graceful shutdown is skipped for safety reasons in case the leader election lease is lost.
6879
type: string
6980
health:
7081
description: Health contains the controller health configuration
7182
properties:
7283
healthProbeBindAddress:
73-
description: HealthProbeBindAddress is the TCP address that the controller
74-
should bind to for serving health probes It can be set to "0" or
75-
"" to disable serving the health probe.
84+
description: |-
85+
HealthProbeBindAddress is the TCP address that the controller should bind to
86+
for serving health probes
87+
It can be set to "0" or "" to disable serving the health probe.
7688
type: string
7789
livenessEndpointName:
7890
description: LivenessEndpointName, defaults to "healthz"
@@ -82,49 +94,60 @@ spec:
8294
type: string
8395
type: object
8496
kind:
85-
description: 'Kind is a string value representing the REST resource this
86-
object represents. Servers may infer this from the endpoint the client
87-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
97+
description: |-
98+
Kind is a string value representing the REST resource this object represents.
99+
Servers may infer this from the endpoint the client submits requests to.
100+
Cannot be updated.
101+
In CamelCase.
102+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
88103
type: string
89104
leaderElection:
90-
description: LeaderElection is the LeaderElection config to be used when
91-
configuring the manager.Manager leader election
105+
description: |-
106+
LeaderElection is the LeaderElection config to be used when configuring
107+
the manager.Manager leader election
92108
properties:
93109
leaderElect:
94-
description: leaderElect enables a leader election client to gain
95-
leadership before executing the main loop. Enable this when running
96-
replicated components for high availability.
110+
description: |-
111+
leaderElect enables a leader election client to gain leadership
112+
before executing the main loop. Enable this when running replicated
113+
components for high availability.
97114
type: boolean
98115
leaseDuration:
99-
description: leaseDuration is the duration that non-leader candidates
100-
will wait after observing a leadership renewal until attempting
101-
to acquire leadership of a led but unrenewed leader slot. This is
102-
effectively the maximum duration that a leader can be stopped before
103-
it is replaced by another candidate. This is only applicable if
104-
leader election is enabled.
116+
description: |-
117+
leaseDuration is the duration that non-leader candidates will wait
118+
after observing a leadership renewal until attempting to acquire
119+
leadership of a led but unrenewed leader slot. This is effectively the
120+
maximum duration that a leader can be stopped before it is replaced
121+
by another candidate. This is only applicable if leader election is
122+
enabled.
105123
type: string
106124
renewDeadline:
107-
description: renewDeadline is the interval between attempts by the
108-
acting master to renew a leadership slot before it stops leading.
109-
This must be less than or equal to the lease duration. This is only
110-
applicable if leader election is enabled.
125+
description: |-
126+
renewDeadline is the interval between attempts by the acting master to
127+
renew a leadership slot before it stops leading. This must be less
128+
than or equal to the lease duration. This is only applicable if leader
129+
election is enabled.
111130
type: string
112131
resourceLock:
113-
description: resourceLock indicates the resource object type that
114-
will be used to lock during leader election cycles.
132+
description: |-
133+
resourceLock indicates the resource object type that will be used to lock
134+
during leader election cycles.
115135
type: string
116136
resourceName:
117-
description: resourceName indicates the name of resource object that
118-
will be used to lock during leader election cycles.
137+
description: |-
138+
resourceName indicates the name of resource object that will be used to lock
139+
during leader election cycles.
119140
type: string
120141
resourceNamespace:
121-
description: resourceName indicates the namespace of resource object
122-
that will be used to lock during leader election cycles.
142+
description: |-
143+
resourceName indicates the namespace of resource object that will be used to lock
144+
during leader election cycles.
123145
type: string
124146
retryPeriod:
125-
description: retryPeriod is the duration the clients should wait between
126-
attempting acquisition and renewal of a leadership. This is only
127-
applicable if leader election is enabled.
147+
description: |-
148+
retryPeriod is the duration the clients should wait between attempting
149+
acquisition and renewal of a leadership. This is only applicable if
150+
leader election is enabled.
128151
type: string
129152
required:
130153
- leaderElect
@@ -141,9 +164,10 @@ spec:
141164
description: Metrics contains the controller metrics configuration
142165
properties:
143166
bindAddress:
144-
description: BindAddress is the TCP address that the controller should
145-
bind to for serving prometheus metrics. It can be set to "0" to
146-
disable the metrics serving.
167+
description: |-
168+
BindAddress is the TCP address that the controller should bind to
169+
for serving prometheus metrics.
170+
It can be set to "0" to disable the metrics serving.
147171
type: string
148172
type: object
149173
spec:
@@ -158,31 +182,33 @@ spec:
158182
description: ProjectConfigStatus defines the observed state of ProjectConfig
159183
type: object
160184
syncPeriod:
161-
description: SyncPeriod determines the minimum frequency at which watched
162-
resources are reconciled. A lower period will correct entropy more quickly,
163-
but reduce responsiveness to change if there are many watched resources.
164-
Change this value only if you know what you are doing. Defaults to 10
165-
hours if unset. there will a 10 percent jitter between the SyncPeriod
166-
of all controllers so that all controllers will not send list requests
167-
simultaneously.
185+
description: |-
186+
SyncPeriod determines the minimum frequency at which watched resources are
187+
reconciled. A lower period will correct entropy more quickly, but reduce
188+
responsiveness to change if there are many watched resources. Change this
189+
value only if you know what you are doing. Defaults to 10 hours if unset.
190+
there will a 10 percent jitter between the SyncPeriod of all controllers
191+
so that all controllers will not send list requests simultaneously.
168192
type: string
169193
webhook:
170194
description: Webhook contains the controllers webhook configuration
171195
properties:
172196
certDir:
173-
description: CertDir is the directory that contains the server key
174-
and certificate. if not set, webhook server would look up the server
175-
key and certificate in {TempDir}/k8s-webhook-server/serving-certs.
176-
The server key and certificate must be named tls.key and tls.crt,
177-
respectively.
197+
description: |-
198+
CertDir is the directory that contains the server key and certificate.
199+
if not set, webhook server would look up the server key and certificate in
200+
{TempDir}/k8s-webhook-server/serving-certs. The server key and certificate
201+
must be named tls.key and tls.crt, respectively.
178202
type: string
179203
host:
180-
description: Host is the hostname that the webhook server binds to.
204+
description: |-
205+
Host is the hostname that the webhook server binds to.
181206
It is used to set webhook.Server.Host.
182207
type: string
183208
port:
184-
description: Port is the port that the webhook server serves at. It
185-
is used to set webhook.Server.Port.
209+
description: |-
210+
Port is the port that the webhook server serves at.
211+
It is used to set webhook.Server.Port.
186212
type: integer
187213
type: object
188214
type: object

0 commit comments

Comments
 (0)