Skip to content

Commit 0469276

Browse files
committed
Bump CAPI to v1.9.0-rc.1
1 parent 3ac9ff9 commit 0469276

File tree

63 files changed

+381
-681
lines changed

Some content is hidden

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

63 files changed

+381
-681
lines changed

Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ 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.0
7474
CONTROLLER_GEN_BIN := controller-gen
7575
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)
7676

@@ -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
@@ -325,7 +321,7 @@ create-management-cluster: $(KUSTOMIZE) $(ENVSUBST) $(KUBECTL) $(KIND) ## Create
325321
./hack/create-custom-cloud-provider-config.sh
326322

327323
# Deploy CAPI
328-
timeout --foreground 300 bash -c "until curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.5/cluster-api-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -; do sleep 5; done"
324+
timeout --foreground 300 bash -c "until curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.0-rc.1/cluster-api-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -; do sleep 5; done"
329325

330326
# Deploy CAAPH
331327
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ settings = {
2020
"deploy_cert_manager": True,
2121
"preload_images_for_kind": True,
2222
"kind_cluster_name": "capz",
23-
"capi_version": "v1.8.5",
23+
"capi_version": "v1.9.0-rc.1",
2424
"caaph_version": "v0.2.5",
2525
"cert_manager_version": "v1.16.1",
2626
"kubernetes_version": "v1.28.3",

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
@@ -158,7 +158,7 @@ func TestAzureManagedCluster_ValidateCreateFailure(t *testing.T) {
158158
for _, tc := range tests {
159159
t.Run(tc.name, func(t *testing.T) {
160160
if tc.featureGateEnabled != nil {
161-
defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)()
161+
utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)
162162
}
163163
g := NewWithT(t)
164164
_, err := tc.amc.ValidateCreate()

api/v1beta1/azuremanagedcontrolplane_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,7 @@ func TestAzureManagedControlPlane_ValidateCreateFailure(t *testing.T) {
16821682
t.Run(tc.name, func(t *testing.T) {
16831683
g := NewWithT(t)
16841684
if tc.featureGateEnabled != nil {
1685-
defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)()
1685+
utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)
16861686
}
16871687
mcpw := &azureManagedControlPlaneWebhook{
16881688
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
@@ -1328,7 +1328,7 @@ func TestAzureManagedMachinePool_ValidateCreateFailure(t *testing.T) {
13281328
for _, tc := range tests {
13291329
t.Run(tc.name, func(t *testing.T) {
13301330
if tc.featureGateEnabled != nil {
1331-
defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)()
1331+
utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)
13321332
}
13331333
g := NewWithT(t)
13341334
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.

azure/errors.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ const (
6262
TransientErrorType ReconcileErrorType = "Transient"
6363
// TerminalErrorType cannot be recovered, will not be requeued.
6464
TerminalErrorType ReconcileErrorType = "Terminal"
65+
// UnsupportedChange is returned when a change is not supported.
66+
UnsupportedChange = "UnsupportedChange"
67+
// InvalidConfiguration is returned when a configuration is invalid.
68+
InvalidConfiguration = "InvalidConfiguration"
69+
// CreateError is returned when an error occurs during creation.
70+
CreateError = "CreateError"
71+
// UpdateError is returned when an error occurs during update.
72+
UpdateError = "UpdateError"
6573
)
6674

6775
// Error returns the error message for a ReconcileError.

azure/scope/cluster_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,7 +2231,7 @@ func TestBackendPoolName(t *testing.T) {
22312231
t.Run(tc.name, func(t *testing.T) {
22322232
g := NewWithT(t)
22332233
if tc.featureGate == feature.APIServerILB {
2234-
defer featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, tc.featureGate, true)()
2234+
featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, tc.featureGate, true)
22352235
}
22362236

22372237
cluster := &clusterv1.Cluster{
@@ -3161,7 +3161,7 @@ func TestClusterScope_LBSpecs(t *testing.T) {
31613161
for _, tc := range tests {
31623162
t.Run(tc.name, func(t *testing.T) {
31633163
if tc.featureGate == feature.APIServerILB {
3164-
defer featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, tc.featureGate, true)()
3164+
featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, tc.featureGate, true)
31653165
}
31663166
cluster := &clusterv1.Cluster{
31673167
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)