Skip to content

Commit 38ff448

Browse files
committed
Bump Cluster API to v1.11.3
1 parent 7d26cf4 commit 38ff448

File tree

229 files changed

+3591
-3557
lines changed

Some content is hidden

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

229 files changed

+3591
-3557
lines changed

.golangci.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,21 @@ linters:
101101
- pkg: sigs.k8s.io/controller-runtime
102102
alias: ctrl
103103
# CAPI
104-
- pkg: sigs.k8s.io/cluster-api/api/v1beta1
104+
- pkg: sigs.k8s.io/cluster-api/api/core/v1beta2
105105
alias: clusterv1
106-
# CAPI exp
107-
- pkg: sigs.k8s.io/cluster-api/exp/api/v1beta1
108-
alias: expv1
106+
- pkg: sigs.k8s.io/cluster-api/api/core/v1beta1
107+
alias: clusterv1beta1
108+
- pkg: sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions
109+
alias: v1beta1conditions
110+
- pkg: sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions/v1beta2
111+
alias: v1beta2conditions
112+
- pkg: sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch
113+
alias: v1beta1patch
114+
# CAPBK
115+
- pkg: sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2
116+
alias: bootstrapv1
117+
- pkg: sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1
118+
alias: bootstrapv1beta1
109119
# CAPZ
110120
- pkg: sigs.k8s.io/cluster-api-provider-azure/api/v1beta1
111121
alias: infrav1
@@ -294,6 +304,15 @@ linters:
294304
- linters:
295305
- goconst
296306
path: (.+)_test\.go
307+
# Ignore Cluster API v1beta1 deprecations.
308+
- linters:
309+
- staticcheck
310+
path: .*\.go$
311+
text: 'SA1019: "sigs.k8s.io\/cluster-api/api/core/v1beta1" is deprecated: This package is deprecated and is going to be removed when support for v1beta1 will be dropped.'
312+
- linters:
313+
- staticcheck
314+
path: .*\.go$
315+
text: 'SA1019: "sigs.k8s.io/cluster-api/util/deprecated/.*" is deprecated: This package is deprecated and is going to be removed when support for v1beta1 will be dropped.'
297316
paths:
298317
- zz_generated\.(\w*)\.go$
299318
- third_party$

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export GOPROXY
3434
export GO111MODULE=on
3535

3636
# Kubebuilder.
37-
export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.32.0
37+
export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.34.0
3838
export KUBEBUILDER_CONTROLPLANE_START_TIMEOUT ?= 60s
3939
export KUBEBUILDER_CONTROLPLANE_STOP_TIMEOUT ?= 60s
4040

@@ -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.16.1
73+
CONTROLLER_GEN_VER := v0.18.0
7474
CONTROLLER_GEN_BIN := controller-gen
7575
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)
7676

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

@@ -142,7 +142,7 @@ CODESPELL_BIN := codespell
142142
CODESPELL_DIST_DIR := codespell_dist
143143
CODESPELL := $(TOOLS_BIN_DIR)/$(CODESPELL_DIST_DIR)/$(CODESPELL_BIN)
144144

145-
SETUP_ENVTEST_VER := release-0.19
145+
SETUP_ENVTEST_VER := release-0.21
146146
SETUP_ENVTEST_BIN := setup-envtest
147147
SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
148148
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest
@@ -358,7 +358,7 @@ create-management-cluster: $(KUSTOMIZE) $(ENVSUBST) $(KUBECTL) $(KIND) ## Create
358358
./hack/create-custom-cloud-provider-config.sh
359359

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

363363
# Deploy CAAPH
364364
timeout --foreground 300 bash -c "until curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm/releases/download/v0.4.1/addon-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -; do sleep 5; done"
@@ -416,7 +416,7 @@ create-workload-cluster: $(ENVSUBST) $(KUBECTL) ## Create a workload cluster.
416416
# Get kubeconfig and store it locally.
417417
$(KUBECTL) get secret/$(CLUSTER_NAME)-kubeconfig -n default -o json | jq -r .data.value | base64 --decode > ./kubeconfig
418418
# TODO: Standardize timeouts across the Makefile and make them configurable based on the job.
419-
$(KUBECTL) -n default wait --for=condition=Ready --timeout=60m cluster "$(CLUSTER_NAME)"
419+
$(KUBECTL) -n default wait --for=condition=Ready --timeout=60m clusters.v1beta1.cluster.x-k8s.io "$(CLUSTER_NAME)"
420420

421421
# Set the namespace to `default` b/c when the service account is auto mounted, the namespace is changed to `test-pods`.
422422
$(KUBECTL) --kubeconfig=./kubeconfig config set-context --current --namespace="default"

Tiltfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ settings = {
2222
"deploy_cert_manager": True,
2323
"preload_images_for_kind": True,
2424
"kind_cluster_name": "capz",
25-
"capi_version": "v1.10.7",
25+
"capi_version": "v1.11.3",
2626
"caaph_version": "v0.4.1",
2727
"cert_manager_version": "v1.19.1",
2828
"kubernetes_version": "v1.32.2",

api/v1alpha1/azureasomanagedcluster_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package v1alpha1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
21+
clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
2222
)
2323

2424
const (
@@ -38,7 +38,7 @@ type AzureASOManagedClusterSpec struct {
3838
// Because this field is programmatically set by CAPZ after resource creation, we define it as +optional
3939
// in the API schema to permit resource admission.
4040
//+optional
41-
ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"`
41+
ControlPlaneEndpoint clusterv1beta1.APIEndpoint `json:"controlPlaneEndpoint"`
4242
}
4343

4444
// AzureASOManagedClusterStatus defines the observed state of AzureASOManagedCluster.

api/v1alpha1/azureasomanagedcontrolplane_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package v1alpha1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
21+
clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
2222
)
2323

2424
// AzureASOManagedControlPlaneKind is the kind for AzureASOManagedControlPlane.
@@ -51,7 +51,7 @@ type AzureASOManagedControlPlaneStatus struct {
5151

5252
// ControlPlaneEndpoint represents the endpoint for the cluster's API server.
5353
//+optional
54-
ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"`
54+
ControlPlaneEndpoint clusterv1beta1.APIEndpoint `json:"controlPlaneEndpoint"`
5555
}
5656

5757
//+kubebuilder:object:root=true

api/v1beta1/azureasomanagedcluster_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package v1beta1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
21+
clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
2222
)
2323

2424
const (
@@ -38,7 +38,7 @@ type AzureASOManagedClusterSpec struct {
3838
// Because this field is programmatically set by CAPZ after resource creation, we define it as +optional
3939
// in the API schema to permit resource admission.
4040
//+optional
41-
ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"`
41+
ControlPlaneEndpoint clusterv1beta1.APIEndpoint `json:"controlPlaneEndpoint"`
4242
}
4343

4444
// AzureASOManagedClusterStatus defines the observed state of AzureASOManagedCluster.

api/v1beta1/azureasomanagedcontrolplane_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package v1beta1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
21+
clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
2222
)
2323

2424
// AzureASOManagedControlPlaneKind is the kind for AzureASOManagedControlPlane.
@@ -51,7 +51,7 @@ type AzureASOManagedControlPlaneStatus struct {
5151

5252
// ControlPlaneEndpoint represents the endpoint for the cluster's API server.
5353
//+optional
54-
ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"`
54+
ControlPlaneEndpoint clusterv1beta1.APIEndpoint `json:"controlPlaneEndpoint"`
5555
}
5656

5757
// +kubebuilder:object:root=true

api/v1beta1/azurecluster_types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package v1beta1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
21+
clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
2222
)
2323

2424
const (
@@ -53,7 +53,7 @@ type AzureClusterSpec struct {
5353
// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. It is not recommended to set
5454
// this when creating an AzureCluster as CAPZ will set this for you. However, if it is set, CAPZ will not change it.
5555
// +optional
56-
ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint,omitempty"`
56+
ControlPlaneEndpoint clusterv1beta1.APIEndpoint `json:"controlPlaneEndpoint,omitempty"`
5757
}
5858

5959
// AzureClusterStatus defines the observed state of AzureCluster.
@@ -65,15 +65,15 @@ type AzureClusterStatus struct {
6565
// See: https://learn.microsoft.com/azure/reliability/availability-zones-overview
6666
// This list will be used by Cluster API to try and spread the machines across the failure domains.
6767
// +optional
68-
FailureDomains clusterv1.FailureDomains `json:"failureDomains,omitempty"`
68+
FailureDomains clusterv1beta1.FailureDomains `json:"failureDomains,omitempty"`
6969

7070
// Ready is true when the provider resource is ready.
7171
// +optional
7272
Ready bool `json:"ready"`
7373

7474
// Conditions defines current service state of the AzureCluster.
7575
// +optional
76-
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
76+
Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"`
7777

7878
// LongRunningOperationStates saves the states for Azure long-running operations so they can be continued on the
7979
// next reconciliation loop.
@@ -114,12 +114,12 @@ type AzureClusterList struct {
114114
}
115115

116116
// GetConditions returns the list of conditions for an AzureCluster API object.
117-
func (c *AzureCluster) GetConditions() clusterv1.Conditions {
117+
func (c *AzureCluster) GetConditions() clusterv1beta1.Conditions {
118118
return c.Status.Conditions
119119
}
120120

121121
// SetConditions will set the given conditions on an AzureCluster object.
122-
func (c *AzureCluster) SetConditions(conditions clusterv1.Conditions) {
122+
func (c *AzureCluster) SetConditions(conditions clusterv1beta1.Conditions) {
123123
c.Status.Conditions = conditions
124124
}
125125

api/v1beta1/azurecluster_webhook_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"testing"
2121

2222
. "github.com/onsi/gomega"
23-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
23+
clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
2424
)
2525

2626
func TestAzureCluster_ValidateCreate(t *testing.T) {
@@ -38,7 +38,7 @@ func TestAzureCluster_ValidateCreate(t *testing.T) {
3838
name: "azurecluster with pre-existing control plane endpoint - valid spec",
3939
cluster: func() *AzureCluster {
4040
cluster := createValidCluster()
41-
cluster.Spec.ControlPlaneEndpoint = clusterv1.APIEndpoint{
41+
cluster.Spec.ControlPlaneEndpoint = clusterv1beta1.APIEndpoint{
4242
Host: "apiserver.example.com",
4343
Port: 8443,
4444
}
@@ -129,15 +129,15 @@ func TestAzureCluster_ValidateUpdate(t *testing.T) {
129129
name: "azurecluster with pre-existing control plane endpoint - valid spec",
130130
oldCluster: func() *AzureCluster {
131131
cluster := createValidCluster()
132-
cluster.Spec.ControlPlaneEndpoint = clusterv1.APIEndpoint{
132+
cluster.Spec.ControlPlaneEndpoint = clusterv1beta1.APIEndpoint{
133133
Host: "apiserver.example.com",
134134
Port: 8443,
135135
}
136136
return cluster
137137
}(),
138138
cluster: func() *AzureCluster {
139139
cluster := createValidCluster()
140-
cluster.Spec.ControlPlaneEndpoint = clusterv1.APIEndpoint{
140+
cluster.Spec.ControlPlaneEndpoint = clusterv1beta1.APIEndpoint{
141141
Host: "apiserver.example.io",
142142
Port: 6443,
143143
}
@@ -150,7 +150,7 @@ func TestAzureCluster_ValidateUpdate(t *testing.T) {
150150
oldCluster: createValidCluster(),
151151
cluster: func() *AzureCluster {
152152
cluster := createValidCluster()
153-
cluster.Spec.ControlPlaneEndpoint = clusterv1.APIEndpoint{
153+
cluster.Spec.ControlPlaneEndpoint = clusterv1beta1.APIEndpoint{
154154
Host: "apiserver.example.com",
155155
Port: 8443,
156156
}

api/v1beta1/azureclusteridentity_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package v1beta1
1919
import (
2020
corev1 "k8s.io/api/core/v1"
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
22+
clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
2323
)
2424

2525
// AllowedNamespaces defines the namespaces the clusters are allowed to use the identity from
@@ -89,7 +89,7 @@ type AzureClusterIdentitySpec struct {
8989
type AzureClusterIdentityStatus struct {
9090
// Conditions defines current service state of the AzureClusterIdentity.
9191
// +optional
92-
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
92+
Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"`
9393
}
9494

9595
// +kubebuilder:object:root=true
@@ -118,12 +118,12 @@ type AzureClusterIdentityList struct {
118118
}
119119

120120
// GetConditions returns the list of conditions for an AzureClusterIdentity API object.
121-
func (c *AzureClusterIdentity) GetConditions() clusterv1.Conditions {
121+
func (c *AzureClusterIdentity) GetConditions() clusterv1beta1.Conditions {
122122
return c.Status.Conditions
123123
}
124124

125125
// SetConditions will set the given conditions on an AzureClusterIdentity object.
126-
func (c *AzureClusterIdentity) SetConditions(conditions clusterv1.Conditions) {
126+
func (c *AzureClusterIdentity) SetConditions(conditions clusterv1beta1.Conditions) {
127127
c.Status.Conditions = conditions
128128
}
129129

0 commit comments

Comments
 (0)