Skip to content

Commit 2b9c390

Browse files
committed
Bump CAPI to v1.9.0-rc.1
1 parent 1275143 commit 2b9c390

File tree

61 files changed

+378
-678
lines changed

Some content is hidden

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

61 files changed

+378
-678
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/machine.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
"k8s.io/apimachinery/pkg/types"
3030
"k8s.io/utils/ptr"
3131
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
32-
capierrors "sigs.k8s.io/cluster-api/errors"
3332
"sigs.k8s.io/cluster-api/util"
3433
"sigs.k8s.io/cluster-api/util/conditions"
3534
"sigs.k8s.io/cluster-api/util/patch"
@@ -603,7 +602,7 @@ func (m *MachineScope) SetFailureMessage(v error) {
603602
}
604603

605604
// SetFailureReason sets the AzureMachine status failure reason.
606-
func (m *MachineScope) SetFailureReason(v capierrors.MachineStatusError) {
605+
func (m *MachineScope) SetFailureReason(v string) {
607606
m.AzureMachine.Status.FailureReason = &v
608607
}
609608

azure/scope/machinepool.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import (
3333
"k8s.io/klog/v2"
3434
"k8s.io/utils/ptr"
3535
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
36-
capierrors "sigs.k8s.io/cluster-api/errors"
3736
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
3837
"sigs.k8s.io/cluster-api/util"
3938
"sigs.k8s.io/cluster-api/util/annotations"
@@ -648,7 +647,7 @@ func (m *MachinePoolScope) SetFailureMessage(v error) {
648647
}
649648

650649
// SetFailureReason sets the AzureMachinePool status failure reason.
651-
func (m *MachinePoolScope) SetFailureReason(v capierrors.MachineStatusError) {
650+
func (m *MachinePoolScope) SetFailureReason(v string) {
652651
m.AzureMachinePool.Status.FailureReason = &v
653652
}
654653

azure/scope/machinepoolmachine.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import (
2828
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
2929
"sigs.k8s.io/cluster-api/controllers/noderefutil"
3030
"sigs.k8s.io/cluster-api/controllers/remote"
31-
capierrors "sigs.k8s.io/cluster-api/errors"
3231
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
3332
"sigs.k8s.io/cluster-api/util/conditions"
3433
"sigs.k8s.io/cluster-api/util/patch"
@@ -277,7 +276,7 @@ func (s *MachinePoolMachineScope) SetFailureMessage(v error) {
277276
}
278277

279278
// SetFailureReason sets the AzureMachinePoolMachine status failure reason.
280-
func (s *MachinePoolMachineScope) SetFailureReason(v capierrors.MachineStatusError) {
279+
func (s *MachinePoolMachineScope) SetFailureReason(v string) {
281280
s.AzureMachinePoolMachine.Status.FailureReason = &v
282281
}
283282

azure/services/resourcehealth/resourcehealth_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func TestReconcileResourceHealth(t *testing.T) {
126126
}{scopeMock, filtererMock}
127127
}
128128

129-
defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.AKSResourceHealth, !tc.featureDisabled)()
129+
utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.AKSResourceHealth, !tc.featureDisabled)
130130

131131
err := s.Reconcile(context.TODO())
132132

config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.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.16.0
77
name: azureasomanagedclusters.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclustertemplates.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.16.0
77
name: azureasomanagedclustertemplates.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.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.16.0
77
name: azureasomanagedcontrolplanes.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanetemplates.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.16.0
77
name: azureasomanagedcontrolplanetemplates.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.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.16.0
77
name: azureasomanagedmachinepools.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepooltemplates.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.16.0
77
name: azureasomanagedmachinepooltemplates.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

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

Lines changed: 5 additions & 7 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.0
77
name: azureclusteridentities.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -75,7 +75,6 @@ spec:
7575
a label query over a set of resources. The result of matchLabels and
7676
matchExpressions are ANDed.
7777
78-
7978
A nil or empty selector indicates that AzureCluster cannot use this
8079
AzureClusterIdentity from any namespace.
8180
properties:
@@ -152,7 +151,6 @@ spec:
152151
ResourceID is the Azure resource ID for the User Assigned MSI resource.
153152
Only applicable when type is UserAssignedMSI.
154153
155-
156154
Deprecated: This field no longer has any effect.
157155
type: string
158156
tenantID:
@@ -200,20 +198,20 @@ spec:
200198
description: |-
201199
The reason for the condition's last transition in CamelCase.
202200
The specific API may choose whether or not this field is considered a guaranteed API.
203-
This field may not be empty.
201+
This field may be empty.
204202
type: string
205203
severity:
206204
description: |-
207-
Severity provides an explicit classification of Reason code, so the users or machines can immediately
205+
severity provides an explicit classification of Reason code, so the users or machines can immediately
208206
understand the current situation and act accordingly.
209207
The Severity field MUST be set only when Status=False.
210208
type: string
211209
status:
212-
description: Status of the condition, one of True, False, Unknown.
210+
description: status of the condition, one of True, False, Unknown.
213211
type: string
214212
type:
215213
description: |-
216-
Type of condition in CamelCase or in foo.example.com/CamelCase.
214+
type of condition in CamelCase or in foo.example.com/CamelCase.
217215
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
218216
can be useful (see .node.status.conditions), the ability to deconflict is important.
219217
type: string

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

Lines changed: 9 additions & 13 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.0
77
name: azureclusters.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -93,7 +93,6 @@ spec:
9393
- PublicCloud: "AzurePublicCloud"
9494
- USGovernmentCloud: "AzureUSGovernmentCloud"
9595
96-
9796
Note that values other than the default must also be accompanied by corresponding changes to the
9897
aso-controller-settings Secret to configure ASO to refer to the non-Public cloud. ASO currently does
9998
not support referring to multiple different clouds in a single installation. The following fields must
@@ -102,10 +101,8 @@ spec:
102101
- AZURE_RESOURCE_MANAGER_ENDPOINT
103102
- AZURE_RESOURCE_MANAGER_AUDIENCE
104103
105-
106104
See the [ASO docs] for more details.
107105
108-
109106
[ASO docs]: https://azure.github.io/azure-service-operator/guide/aso-controller-settings-options/
110107
type: string
111108
bastionSpec:
@@ -597,11 +594,11 @@ spec:
597594
attributes:
598595
additionalProperties:
599596
type: string
600-
description: Attributes is a free form map of attributes an
597+
description: attributes is a free form map of attributes an
601598
infrastructure provider might use or require.
602599
type: object
603600
controlPlane:
604-
description: ControlPlane determines if this failure domain
601+
description: controlPlane determines if this failure domain
605602
is suitable for use by control plane machines.
606603
type: boolean
607604
type: object
@@ -627,7 +624,6 @@ spec:
627624
the event) or if no container name is specified "spec.containers[2]" (container with
628625
index 2 in this pod). This syntax is chosen only to have some well-defined way of
629626
referencing a part of an object.
630-
TODO: this design is not final and this field is subject to change in the future.
631627
type: string
632628
kind:
633629
description: |-
@@ -1358,20 +1354,20 @@ spec:
13581354
description: |-
13591355
The reason for the condition's last transition in CamelCase.
13601356
The specific API may choose whether or not this field is considered a guaranteed API.
1361-
This field may not be empty.
1357+
This field may be empty.
13621358
type: string
13631359
severity:
13641360
description: |-
1365-
Severity provides an explicit classification of Reason code, so the users or machines can immediately
1361+
severity provides an explicit classification of Reason code, so the users or machines can immediately
13661362
understand the current situation and act accordingly.
13671363
The Severity field MUST be set only when Status=False.
13681364
type: string
13691365
status:
1370-
description: Status of the condition, one of True, False, Unknown.
1366+
description: status of the condition, one of True, False, Unknown.
13711367
type: string
13721368
type:
13731369
description: |-
1374-
Type of condition in CamelCase or in foo.example.com/CamelCase.
1370+
type of condition in CamelCase or in foo.example.com/CamelCase.
13751371
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
13761372
can be useful (see .node.status.conditions), the ability to deconflict is important.
13771373
type: string
@@ -1390,11 +1386,11 @@ spec:
13901386
attributes:
13911387
additionalProperties:
13921388
type: string
1393-
description: Attributes is a free form map of attributes an
1389+
description: attributes is a free form map of attributes an
13941390
infrastructure provider might use or require.
13951391
type: object
13961392
controlPlane:
1397-
description: ControlPlane determines if this failure domain
1393+
description: controlPlane determines if this failure domain
13981394
is suitable for use by control plane machines.
13991395
type: boolean
14001396
type: object

0 commit comments

Comments
 (0)