Skip to content

Commit aac663c

Browse files
authored
Merge pull request #5316 from mboersma/bump-capi-one-nine-zero
Bump CAPI to v1.9.4
2 parents b026094 + ebf4bd4 commit aac663c

File tree

71 files changed

+411
-707
lines changed

Some content is hidden

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

71 files changed

+411
-707
lines changed

Makefile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ ifneq ($(abspath $(ROOT_DIR)),$(GOPATH)/src/sigs.k8s.io/cluster-api-provider-azu
7070
endif
7171

7272
# Binaries.
73-
CONTROLLER_GEN_VER := v0.15.0
73+
CONTROLLER_GEN_VER := v0.16.1
7474
CONTROLLER_GEN_BIN := controller-gen
7575
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)
7676

77-
CONVERSION_GEN_VER := v0.30.0
77+
CONVERSION_GEN_VER := v0.31.0
7878
CONVERSION_GEN_BIN := conversion-gen
7979
CONVERSION_GEN := $(TOOLS_BIN_DIR)/$(CONVERSION_GEN_BIN)-$(CONVERSION_GEN_VER)
8080

@@ -135,11 +135,7 @@ CODESPELL_BIN := codespell
135135
CODESPELL_DIST_DIR := codespell_dist
136136
CODESPELL := $(TOOLS_BIN_DIR)/$(CODESPELL_DIST_DIR)/$(CODESPELL_BIN)
137137

138-
# This is a commit from CR main (22.05.2024).
139-
# Intentionally using a commit from main to use a setup-envtest version
140-
# that uses binaries from controller-tools, not GCS.
141-
# CR PR: https://github.com/kubernetes-sigs/controller-runtime/pull/2811
142-
SETUP_ENVTEST_VER := v0.0.0-20240522175850-2e9781e9fc60
138+
SETUP_ENVTEST_VER := release-0.19
143139
SETUP_ENVTEST_BIN := setup-envtest
144140
SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
145141
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest
@@ -332,7 +328,7 @@ create-management-cluster: $(KUSTOMIZE) $(ENVSUBST) $(KUBECTL) $(KIND) ## Create
332328
./hack/create-custom-cloud-provider-config.sh
333329

334330
# Deploy CAPI
335-
timeout --foreground 300 bash -c "until curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.8/cluster-api-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -; do sleep 5; done"
331+
timeout --foreground 300 bash -c "until curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.4/cluster-api-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -; do sleep 5; done"
336332

337333
# Deploy CAAPH
338334
timeout --foreground 300 bash -c "until curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm/releases/download/v0.2.5/addon-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -; do sleep 5; done"

Tiltfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ settings = {
2020
"deploy_cert_manager": True,
2121
"preload_images_for_kind": True,
2222
"kind_cluster_name": "capz",
23-
"capi_version": "v1.8.8",
23+
"capi_version": "v1.9.4",
2424
"caaph_version": "v0.2.5",
25-
"cert_manager_version": "v1.16.1",
25+
"cert_manager_version": "v1.16.2",
2626
"kubernetes_version": "v1.30.2",
2727
"aks_kubernetes_version": "v1.30.2",
2828
"flatcar_version": "3374.2.1",

api/v1beta1/azurecluster_default_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,7 @@ func TestAPIServerLBDefaults(t *testing.T) {
16021602
tc := c
16031603
t.Run(tc.name, func(t *testing.T) {
16041604
if tc.featureGate != "" {
1605-
defer featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, tc.featureGate, true)()
1605+
featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, tc.featureGate, true)
16061606
}
16071607
tc.cluster.setAPIServerLBDefaults()
16081608
if !reflect.DeepEqual(tc.cluster, tc.output) {

api/v1beta1/azurecluster_validation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ func TestValidateAPIServerLB(t *testing.T) {
12801280
t.Run(test.name, func(t *testing.T) {
12811281
g := NewWithT(t)
12821282
if test.featureGate == feature.APIServerILB {
1283-
defer featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, test.featureGate, true)()
1283+
featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, test.featureGate, true)
12841284
}
12851285
err := validateAPIServerLB(test.lb, test.old, test.cpCIDRS, field.NewPath("apiServerLB"))
12861286
if test.wantErr {

api/v1beta1/azuremachine_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"k8s.io/apimachinery/pkg/api/resource"
2222
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2323
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
24-
"sigs.k8s.io/cluster-api/errors"
2524
)
2625

2726
const (
@@ -219,7 +218,7 @@ type AzureMachineStatus struct {
219218
// can be added as events to the Machine object and/or logged in the
220219
// controller's output.
221220
// +optional
222-
FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"`
221+
FailureReason *string `json:"failureReason,omitempty"`
223222

224223
// ErrorMessage will be set in the event that there is a terminal problem
225224
// reconciling the Machine and will contain a more verbose string suitable

api/v1beta1/azuremanagedcluster_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func TestAzureManagedCluster_ValidateCreateFailure(t *testing.T) {
151151
for _, tc := range tests {
152152
t.Run(tc.name, func(t *testing.T) {
153153
if tc.featureGateEnabled != nil {
154-
defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)()
154+
utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)
155155
}
156156
g := NewWithT(t)
157157
_, err := tc.amc.ValidateCreate()

api/v1beta1/azuremanagedcontrolplane_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ func TestAzureManagedControlPlane_ValidateCreateFailure(t *testing.T) {
16691669
t.Run(tc.name, func(t *testing.T) {
16701670
g := NewWithT(t)
16711671
if tc.featureGateEnabled != nil {
1672-
defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)()
1672+
utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)
16731673
}
16741674
mcpw := &azureManagedControlPlaneWebhook{
16751675
Client: client,

api/v1beta1/azuremanagedmachinepool_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package v1beta1
1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2121
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
22-
capierrors "sigs.k8s.io/cluster-api/errors"
2322
)
2423

2524
const (
@@ -464,7 +463,7 @@ type AzureManagedMachinePoolStatus struct {
464463
// can be added as events to the Machine object and/or logged in the
465464
// controller's output.
466465
// +optional
467-
ErrorReason *capierrors.MachineStatusError `json:"errorReason,omitempty"`
466+
ErrorReason *string `json:"errorReason,omitempty"`
468467

469468
// Any transient errors that occur during the reconciliation of Machines
470469
// can be added as events to the Machine object and/or logged in the

api/v1beta1/azuremanagedmachinepool_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ func TestAzureManagedMachinePool_ValidateCreateFailure(t *testing.T) {
13211321
for _, tc := range tests {
13221322
t.Run(tc.name, func(t *testing.T) {
13231323
if tc.featureGateEnabled != nil {
1324-
defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)()
1324+
utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)
13251325
}
13261326
g := NewWithT(t)
13271327
mw := &azureManagedMachinePoolWebhook{}

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)