Skip to content

Commit 571d384

Browse files
authored
Merge pull request #290 from microsoft/adammartini/capi-1.9
Update to CAPI 1.9, manually verified with deployment
2 parents 0edb25c + d92041a commit 571d384

18 files changed

+184
-237
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export PATH := $(TOOLS_BIN_DIR):$(PATH)
6464
OUTPUT_BASE := --output-base=$(ROOT_DIR)
6565

6666
# the current cluster API version
67-
CAPI_VERSION := v1.7.2
67+
CAPI_VERSION := v1.9.4
6868

6969
# Binaries.
7070
GO_INSTALL = ./scripts/go_install.sh
@@ -74,7 +74,7 @@ CLUSTERCTL_VER := $(CAPI_VERSION)
7474
CLUSTERCTL_BIN := clusterctl
7575
CLUSTERCTL := $(TOOLS_BIN_DIR)/$(CLUSTERCTL_BIN)-$(CLUSTERCTL_VER)
7676

77-
CONTROLLER_GEN_VER := v0.15.0
77+
CONTROLLER_GEN_VER := v0.17.2
7878
CONTROLLER_GEN_BIN := controller-gen
7979
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)
8080

@@ -110,12 +110,12 @@ GINKGO_VER := v2.19.0
110110
GINKGO_BIN := ginkgo
111111
GINKGO := $(TOOLS_BIN_DIR)/$(GINKGO_BIN)-$(GINKGO_VER)
112112

113-
KUBECTL_VER := v1.29.0
113+
KUBECTL_VER := v1.31.0
114114
KUBECTL_BIN := kubectl
115115
KUBECTL := $(TOOLS_BIN_DIR)/$(KUBECTL_BIN)-$(KUBECTL_VER)
116116

117117
# ENVTEST is used for running controller tests.
118-
SETUP_ENVTEST_VER := 116a1b831fffe7ccc3c8145306c3e1a3b1b14ffa # Note: this matches the commit ID of the dependent controller-runtime module.
118+
SETUP_ENVTEST_VER := v0.0.0-20240522175850-2e9781e9fc60 # updating this to match the version that pulls from controller-tools, details in https://github.com/kubernetes-sigs/cluster-api/pull/10569
119119
SETUP_ENVTEST_BIN := setup-envtest
120120
SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
121121

cmd/manager/main.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import (
4646
"sigs.k8s.io/controller-runtime/pkg/controller"
4747
"sigs.k8s.io/controller-runtime/pkg/healthz"
4848
ctrlmgr "sigs.k8s.io/controller-runtime/pkg/manager"
49+
"sigs.k8s.io/controller-runtime/pkg/reconcile"
4950
"sigs.k8s.io/controller-runtime/pkg/webhook"
5051
)
5152

@@ -206,7 +207,7 @@ func main() {
206207
Recorder: mgr.GetEventRecorderFor("azurestackhcimachine-reconciler"),
207208
}).SetupWithManager(mgr, controller.Options{
208209
MaxConcurrentReconciles: azureStackHCIMachineConcurrency,
209-
RateLimiter: workqueue.DefaultControllerRateLimiter(),
210+
RateLimiter: workqueue.DefaultTypedControllerRateLimiter[reconcile.Request](),
210211
}); err != nil {
211212
setupLog.Error(err, "unable to create controller", "controller", "AzureStackHCIMachine")
212213
os.Exit(1)
@@ -217,7 +218,7 @@ func main() {
217218
Recorder: mgr.GetEventRecorderFor("azurestackhcicluster-reconciler"),
218219
}).SetupWithManager(mgr, controller.Options{
219220
MaxConcurrentReconciles: azureStackHCIClusterConcurrency,
220-
RateLimiter: workqueue.DefaultControllerRateLimiter(),
221+
RateLimiter: workqueue.DefaultTypedControllerRateLimiter[reconcile.Request](),
221222
}); err != nil {
222223
setupLog.Error(err, "unable to create controller", "controller", "AzureStackHCICluster")
223224
os.Exit(1)
@@ -228,7 +229,7 @@ func main() {
228229
Recorder: mgr.GetEventRecorderFor("azurestackhciloadbalancer-reconciler"),
229230
}).SetupWithManager(mgr, controller.Options{
230231
MaxConcurrentReconciles: azureStackHCIloadBalancerConcurrency,
231-
RateLimiter: workqueue.DefaultControllerRateLimiter(),
232+
RateLimiter: workqueue.DefaultTypedControllerRateLimiter[reconcile.Request](),
232233
}); err != nil {
233234
setupLog.Error(err, "unable to create controller", "controller", "AzureStackHCILoadBalancer")
234235
os.Exit(1)
@@ -240,7 +241,7 @@ func main() {
240241
Recorder: mgr.GetEventRecorderFor("azurestackhcivirtualmachine-reconciler"),
241242
}).SetupWithManager(mgr, controller.Options{
242243
MaxConcurrentReconciles: azureStackHCIVirtualMachineConcurrency,
243-
RateLimiter: workqueue.DefaultControllerRateLimiter(),
244+
RateLimiter: workqueue.DefaultTypedControllerRateLimiter[reconcile.Request](),
244245
}); err != nil {
245246
setupLog.Error(err, "unable to create controller", "controller", "AzureStackHCIVirtualMachine")
246247
os.Exit(1)

config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciclusters.yaml

Lines changed: 5 additions & 5 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.17.2
77
name: azurestackhciclusters.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -286,20 +286,20 @@ spec:
286286
description: |-
287287
The reason for the condition's last transition in CamelCase.
288288
The specific API may choose whether or not this field is considered a guaranteed API.
289-
This field may not be empty.
289+
This field may be empty.
290290
type: string
291291
severity:
292292
description: |-
293-
Severity provides an explicit classification of Reason code, so the users or machines can immediately
293+
severity provides an explicit classification of Reason code, so the users or machines can immediately
294294
understand the current situation and act accordingly.
295295
The Severity field MUST be set only when Status=False.
296296
type: string
297297
status:
298-
description: Status of the condition, one of True, False, Unknown.
298+
description: status of the condition, one of True, False, Unknown.
299299
type: string
300300
type:
301301
description: |-
302-
Type of condition in CamelCase or in foo.example.com/CamelCase.
302+
type of condition in CamelCase or in foo.example.com/CamelCase.
303303
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
304304
can be useful (see .node.status.conditions), the ability to deconflict is important.
305305
type: string

config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciclustertemplates.yaml

Lines changed: 1 addition & 1 deletion
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.17.2
77
name: azurestackhciclustertemplates.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciloadbalancers.yaml

Lines changed: 5 additions & 9 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.17.2
77
name: azurestackhciloadbalancers.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -150,20 +150,20 @@ spec:
150150
description: |-
151151
The reason for the condition's last transition in CamelCase.
152152
The specific API may choose whether or not this field is considered a guaranteed API.
153-
This field may not be empty.
153+
This field may be empty.
154154
type: string
155155
severity:
156156
description: |-
157-
Severity provides an explicit classification of Reason code, so the users or machines can immediately
157+
severity provides an explicit classification of Reason code, so the users or machines can immediately
158158
understand the current situation and act accordingly.
159159
The Severity field MUST be set only when Status=False.
160160
type: string
161161
status:
162-
description: Status of the condition, one of True, False, Unknown.
162+
description: status of the condition, one of True, False, Unknown.
163163
type: string
164164
type:
165165
description: |-
166-
Type of condition in CamelCase or in foo.example.com/CamelCase.
166+
type of condition in CamelCase or in foo.example.com/CamelCase.
167167
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
168168
can be useful (see .node.status.conditions), the ability to deconflict is important.
169169
type: string
@@ -179,7 +179,6 @@ spec:
179179
reconciling the Machine and will contain a more verbose string suitable
180180
for logging and human consumption.
181181
182-
183182
This field should not be set for transitive errors that a controller
184183
faces that are expected to be fixed automatically over
185184
time (like service outages), but instead indicate that something is
@@ -189,7 +188,6 @@ spec:
189188
spec, values that are unsupported by the controller, or the
190189
responsible controller itself being critically misconfigured.
191190
192-
193191
Any transient errors that occur during the reconciliation of Machines
194192
can be added as events to the Machine object and/or logged in the
195193
controller's output.
@@ -200,7 +198,6 @@ spec:
200198
reconciling the Machine and will contain a succinct value suitable
201199
for machine interpretation.
202200
203-
204201
This field should not be set for transitive errors that a controller
205202
faces that are expected to be fixed automatically over
206203
time (like service outages), but instead indicate that something is
@@ -210,7 +207,6 @@ spec:
210207
spec, values that are unsupported by the controller, or the
211208
responsible controller itself being critically misconfigured.
212209
213-
214210
Any transient errors that occur during the reconciliation of Machines
215211
can be added as events to the Machine object and/or logged in the
216212
controller's output.

config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachines.yaml

Lines changed: 5 additions & 9 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.17.2
77
name: azurestackhcimachines.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -213,20 +213,20 @@ spec:
213213
description: |-
214214
The reason for the condition's last transition in CamelCase.
215215
The specific API may choose whether or not this field is considered a guaranteed API.
216-
This field may not be empty.
216+
This field may be empty.
217217
type: string
218218
severity:
219219
description: |-
220-
Severity provides an explicit classification of Reason code, so the users or machines can immediately
220+
severity provides an explicit classification of Reason code, so the users or machines can immediately
221221
understand the current situation and act accordingly.
222222
The Severity field MUST be set only when Status=False.
223223
type: string
224224
status:
225-
description: Status of the condition, one of True, False, Unknown.
225+
description: status of the condition, one of True, False, Unknown.
226226
type: string
227227
type:
228228
description: |-
229-
Type of condition in CamelCase or in foo.example.com/CamelCase.
229+
type of condition in CamelCase or in foo.example.com/CamelCase.
230230
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
231231
can be useful (see .node.status.conditions), the ability to deconflict is important.
232232
type: string
@@ -242,7 +242,6 @@ spec:
242242
reconciling the Machine and will contain a more verbose string suitable
243243
for logging and human consumption.
244244
245-
246245
This field should not be set for transitive errors that a controller
247246
faces that are expected to be fixed automatically over
248247
time (like service outages), but instead indicate that something is
@@ -252,7 +251,6 @@ spec:
252251
spec, values that are unsupported by the controller, or the
253252
responsible controller itself being critically misconfigured.
254253
255-
256254
Any transient errors that occur during the reconciliation of Machines
257255
can be added as events to the Machine object and/or logged in the
258256
controller's output.
@@ -263,7 +261,6 @@ spec:
263261
reconciling the Machine and will contain a succinct value suitable
264262
for machine interpretation.
265263
266-
267264
This field should not be set for transitive errors that a controller
268265
faces that are expected to be fixed automatically over
269266
time (like service outages), but instead indicate that something is
@@ -273,7 +270,6 @@ spec:
273270
spec, values that are unsupported by the controller, or the
274271
responsible controller itself being critically misconfigured.
275272
276-
277273
Any transient errors that occur during the reconciliation of Machines
278274
can be added as events to the Machine object and/or logged in the
279275
controller's output.

config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachinetemplates.yaml

Lines changed: 1 addition & 1 deletion
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.17.2
77
name: azurestackhcimachinetemplates.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml

Lines changed: 5 additions & 5 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.17.2
77
name: azurestackhcivirtualmachines.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -233,20 +233,20 @@ spec:
233233
description: |-
234234
The reason for the condition's last transition in CamelCase.
235235
The specific API may choose whether or not this field is considered a guaranteed API.
236-
This field may not be empty.
236+
This field may be empty.
237237
type: string
238238
severity:
239239
description: |-
240-
Severity provides an explicit classification of Reason code, so the users or machines can immediately
240+
severity provides an explicit classification of Reason code, so the users or machines can immediately
241241
understand the current situation and act accordingly.
242242
The Severity field MUST be set only when Status=False.
243243
type: string
244244
status:
245-
description: Status of the condition, one of True, False, Unknown.
245+
description: status of the condition, one of True, False, Unknown.
246246
type: string
247247
type:
248248
description: |-
249-
Type of condition in CamelCase or in foo.example.com/CamelCase.
249+
type of condition in CamelCase or in foo.example.com/CamelCase.
250250
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
251251
can be useful (see .node.status.conditions), the ability to deconflict is important.
252252
type: string

config/crd/patches/webhook_in_azurestackhciclusters.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ spec:
1010
webhook:
1111
conversionReviewVersions: ["v1", "v1beta1"]
1212
clientConfig:
13-
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
14-
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
15-
caBundle: Cg==
1613
service:
1714
namespace: system
1815
name: webhook-service

config/crd/patches/webhook_in_azurestackhciloadbalancers.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ spec:
1010
webhook:
1111
conversionReviewVersions: ["v1", "v1beta1"]
1212
clientConfig:
13-
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
14-
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
15-
caBundle: Cg==
1613
service:
1714
namespace: system
1815
name: webhook-service

0 commit comments

Comments
 (0)