Skip to content

Commit ec48ec6

Browse files
authored
Merge pull request #3519 from fabriziopandini/bump-capi-v1.11.0-alpha.1
🌱 Bump to CAPI v1.11.0-alpha.1
2 parents 5941928 + 07f0f52 commit ec48ec6

File tree

12 files changed

+50
-66
lines changed

12 files changed

+50
-66
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ IMPORT_BOSS_VER := v0.28.1
190190
IMPORT_BOSS := $(abspath $(TOOLS_BIN_DIR)/$(IMPORT_BOSS_BIN))
191191
IMPORT_BOSS_PKG := k8s.io/code-generator/cmd/import-boss
192192

193-
CAPI_HACK_TOOLS_VER := 5eee55a4d0ddf653535c1a9235001735861ba4c2 # Note: this the commit ID for CAPI v1.11.0-alpha.0
193+
CAPI_HACK_TOOLS_VER := abcc6d85c72aeaa652976f7f7bb341f0db9f4073 # Note: this the commit ID for CAPI v1.11.0-alpha.1
194194

195195
BOSKOSCTL_BIN := boskosctl
196196
BOSKOSCTL := $(abspath $(TOOLS_BIN_DIR)/$(BOSKOSCTL_BIN))
@@ -510,7 +510,8 @@ verify-gen: generate ## Verify go generated files are up to date
510510

511511
.PHONY: verify-conversions
512512
verify-conversions: $(CONVERSION_VERIFIER) ## Verifies expected API conversion are in place
513-
$(CONVERSION_VERIFIER)
513+
$(CONVERSION_VERIFIER) \
514+
./apis/...
514515

515516
.PHONY: verify-doctoc
516517
verify-doctoc: generate-doctoc

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module sigs.k8s.io/cluster-api-provider-vsphere
22

33
go 1.24.0
44

5-
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.11.0-alpha.0
5+
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.11.0-alpha.1
66

77
replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505
88

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6J
376376
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
377377
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM=
378378
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
379-
sigs.k8s.io/cluster-api v1.11.0-alpha.0 h1:QyU9uGq2fAee+LC+/q3Q5QxCLnAUzMFYzIiIAM/sCfU=
380-
sigs.k8s.io/cluster-api v1.11.0-alpha.0/go.mod h1:UmipfrOBTqjRNX7X4zuJCInq28/Fh6xq9RklOJ/DMR4=
379+
sigs.k8s.io/cluster-api v1.11.0-alpha.1 h1:8apMLTVE7NC+vLM8Xi5TVk0OoEHW8DT8L09IoBOBlgs=
380+
sigs.k8s.io/cluster-api v1.11.0-alpha.1/go.mod h1:5CVeCZAsEBg/eZpr7wsYntHE7QFqMX8IzNH+MWhAhQg=
381381
sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=
382382
sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=
383383
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=

packaging/flavorgen/flavors/clusterclass_generators.go

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"fmt"
2121
"strings"
2222

23-
corev1 "k8s.io/api/core/v1"
2423
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2524
"k8s.io/utils/ptr"
2625
bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
@@ -47,11 +46,10 @@ func newClusterClass() clusterv1.ClusterClass {
4746
},
4847
Spec: clusterv1.ClusterClassSpec{
4948
Infrastructure: clusterv1.InfrastructureClass{
50-
LocalObjectTemplate: clusterv1.LocalObjectTemplate{
51-
Ref: &corev1.ObjectReference{
49+
ClusterClassTemplate: clusterv1.ClusterClassTemplate{
50+
Ref: &clusterv1.ClusterClassTemplateReference{
5251
APIVersion: infrav1.GroupVersion.String(),
5352
Kind: util.TypeToKind(&infrav1.VSphereClusterTemplate{}),
54-
Namespace: env.NamespaceVar,
5553
Name: env.ClusterClassNameVar,
5654
},
5755
},
@@ -75,11 +73,10 @@ func newVMWareClusterClass() clusterv1.ClusterClass {
7573
},
7674
Spec: clusterv1.ClusterClassSpec{
7775
Infrastructure: clusterv1.InfrastructureClass{
78-
LocalObjectTemplate: clusterv1.LocalObjectTemplate{
79-
Ref: &corev1.ObjectReference{
76+
ClusterClassTemplate: clusterv1.ClusterClassTemplate{
77+
Ref: &clusterv1.ClusterClassTemplateReference{
8078
APIVersion: vmwarev1.GroupVersion.String(),
8179
Kind: util.TypeToKind(&vmwarev1.VSphereClusterTemplate{}),
82-
Namespace: env.NamespaceVar,
8380
Name: env.ClusterClassNameVar,
8481
},
8582
},
@@ -94,19 +91,17 @@ func newVMWareClusterClass() clusterv1.ClusterClass {
9491

9592
func getControlPlaneClass() clusterv1.ControlPlaneClass {
9693
return clusterv1.ControlPlaneClass{
97-
LocalObjectTemplate: clusterv1.LocalObjectTemplate{
98-
Ref: &corev1.ObjectReference{
94+
ClusterClassTemplate: clusterv1.ClusterClassTemplate{
95+
Ref: &clusterv1.ClusterClassTemplateReference{
9996
Kind: util.TypeToKind(&controlplanev1.KubeadmControlPlaneTemplate{}),
100-
Namespace: env.NamespaceVar,
10197
Name: fmt.Sprintf("%s-controlplane", env.ClusterClassNameVar),
10298
APIVersion: controlplanev1.GroupVersion.String(),
10399
},
104100
},
105-
MachineInfrastructure: &clusterv1.LocalObjectTemplate{
106-
Ref: &corev1.ObjectReference{
101+
MachineInfrastructure: &clusterv1.ClusterClassTemplate{
102+
Ref: &clusterv1.ClusterClassTemplateReference{
107103
APIVersion: infrav1.GroupVersion.String(),
108104
Kind: util.TypeToKind(&infrav1.VSphereMachineTemplate{}),
109-
Namespace: env.NamespaceVar,
110105
Name: fmt.Sprintf("%s-template", env.ClusterClassNameVar),
111106
},
112107
},
@@ -115,19 +110,17 @@ func getControlPlaneClass() clusterv1.ControlPlaneClass {
115110

116111
func getVMWareControlPlaneClass() clusterv1.ControlPlaneClass {
117112
return clusterv1.ControlPlaneClass{
118-
LocalObjectTemplate: clusterv1.LocalObjectTemplate{
119-
Ref: &corev1.ObjectReference{
113+
ClusterClassTemplate: clusterv1.ClusterClassTemplate{
114+
Ref: &clusterv1.ClusterClassTemplateReference{
120115
Kind: util.TypeToKind(&controlplanev1.KubeadmControlPlaneTemplate{}),
121-
Namespace: env.NamespaceVar,
122116
Name: fmt.Sprintf("%s-controlplane", env.ClusterClassNameVar),
123117
APIVersion: controlplanev1.GroupVersion.String(),
124118
},
125119
},
126-
MachineInfrastructure: &clusterv1.LocalObjectTemplate{
127-
Ref: &corev1.ObjectReference{
120+
MachineInfrastructure: &clusterv1.ClusterClassTemplate{
121+
Ref: &clusterv1.ClusterClassTemplateReference{
128122
APIVersion: vmwarev1.GroupVersion.String(),
129123
Kind: util.TypeToKind(&vmwarev1.VSphereMachineTemplate{}),
130-
Namespace: env.NamespaceVar,
131124
Name: fmt.Sprintf("%s-template", env.ClusterClassNameVar),
132125
},
133126
},
@@ -140,18 +133,16 @@ func getWorkersClass() clusterv1.WorkersClass {
140133
{
141134
Class: fmt.Sprintf("%s-worker", env.ClusterClassNameVar),
142135
Template: clusterv1.MachineDeploymentClassTemplate{
143-
Bootstrap: clusterv1.LocalObjectTemplate{
144-
Ref: &corev1.ObjectReference{
136+
Bootstrap: clusterv1.ClusterClassTemplate{
137+
Ref: &clusterv1.ClusterClassTemplateReference{
145138
APIVersion: bootstrapv1.GroupVersion.String(),
146139
Kind: util.TypeToKind(&bootstrapv1.KubeadmConfigTemplate{}),
147-
Namespace: env.NamespaceVar,
148140
Name: fmt.Sprintf("%s-worker-bootstrap-template", env.ClusterClassNameVar),
149141
},
150142
},
151-
Infrastructure: clusterv1.LocalObjectTemplate{
152-
Ref: &corev1.ObjectReference{
143+
Infrastructure: clusterv1.ClusterClassTemplate{
144+
Ref: &clusterv1.ClusterClassTemplateReference{
153145
Kind: util.TypeToKind(&infrav1.VSphereMachineTemplate{}),
154-
Namespace: env.NamespaceVar,
155146
Name: fmt.Sprintf("%s-worker-machinetemplate", env.ClusterClassNameVar),
156147
APIVersion: infrav1.GroupVersion.String(),
157148
},
@@ -168,18 +159,16 @@ func getVMWareWorkersClass() clusterv1.WorkersClass {
168159
{
169160
Class: fmt.Sprintf("%s-worker", env.ClusterClassNameVar),
170161
Template: clusterv1.MachineDeploymentClassTemplate{
171-
Bootstrap: clusterv1.LocalObjectTemplate{
172-
Ref: &corev1.ObjectReference{
162+
Bootstrap: clusterv1.ClusterClassTemplate{
163+
Ref: &clusterv1.ClusterClassTemplateReference{
173164
APIVersion: bootstrapv1.GroupVersion.String(),
174165
Kind: util.TypeToKind(&bootstrapv1.KubeadmConfigTemplate{}),
175-
Namespace: env.NamespaceVar,
176166
Name: fmt.Sprintf("%s-worker-bootstrap-template", env.ClusterClassNameVar),
177167
},
178168
},
179-
Infrastructure: clusterv1.LocalObjectTemplate{
180-
Ref: &corev1.ObjectReference{
169+
Infrastructure: clusterv1.ClusterClassTemplate{
170+
Ref: &clusterv1.ClusterClassTemplateReference{
181171
Kind: util.TypeToKind(&vmwarev1.VSphereMachineTemplate{}),
182-
Namespace: env.NamespaceVar,
183172
Name: fmt.Sprintf("%s-worker-machinetemplate", env.ClusterClassNameVar),
184173
APIVersion: vmwarev1.GroupVersion.String(),
185174
},

packaging/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module sigs.k8s.io/cluster-api-provider-vsphere/packaging
22

33
go 1.24.0
44

5-
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.11.0-alpha.0
5+
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.11.0-alpha.1
66

77
replace sigs.k8s.io/cluster-api-provider-vsphere => ../
88

packaging/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUy
235235
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
236236
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
237237
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
238-
sigs.k8s.io/cluster-api v1.11.0-alpha.0 h1:QyU9uGq2fAee+LC+/q3Q5QxCLnAUzMFYzIiIAM/sCfU=
239-
sigs.k8s.io/cluster-api v1.11.0-alpha.0/go.mod h1:UmipfrOBTqjRNX7X4zuJCInq28/Fh6xq9RklOJ/DMR4=
238+
sigs.k8s.io/cluster-api v1.11.0-alpha.1 h1:8apMLTVE7NC+vLM8Xi5TVk0OoEHW8DT8L09IoBOBlgs=
239+
sigs.k8s.io/cluster-api v1.11.0-alpha.1/go.mod h1:5CVeCZAsEBg/eZpr7wsYntHE7QFqMX8IzNH+MWhAhQg=
240240
sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=
241241
sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=
242242
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=

templates/clusterclass-template-supervisor.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,15 @@ spec:
1818
apiVersion: vmware.infrastructure.cluster.x-k8s.io/v1beta1
1919
kind: VSphereMachineTemplate
2020
name: ${CLUSTER_CLASS_NAME}-template
21-
namespace: '${NAMESPACE}'
2221
ref:
2322
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
2423
kind: KubeadmControlPlaneTemplate
2524
name: ${CLUSTER_CLASS_NAME}-controlplane
26-
namespace: '${NAMESPACE}'
2725
infrastructure:
2826
ref:
2927
apiVersion: vmware.infrastructure.cluster.x-k8s.io/v1beta1
3028
kind: VSphereClusterTemplate
3129
name: '${CLUSTER_CLASS_NAME}'
32-
namespace: '${NAMESPACE}'
3330
patches:
3431
- definitions:
3532
- jsonPatches:
@@ -219,13 +216,11 @@ spec:
219216
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
220217
kind: KubeadmConfigTemplate
221218
name: ${CLUSTER_CLASS_NAME}-worker-bootstrap-template
222-
namespace: '${NAMESPACE}'
223219
infrastructure:
224220
ref:
225221
apiVersion: vmware.infrastructure.cluster.x-k8s.io/v1beta1
226222
kind: VSphereMachineTemplate
227223
name: ${CLUSTER_CLASS_NAME}-worker-machinetemplate
228-
namespace: '${NAMESPACE}'
229224
metadata: {}
230225
---
231226
apiVersion: vmware.infrastructure.cluster.x-k8s.io/v1beta1

templates/clusterclass-template.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,15 @@ spec:
1818
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
1919
kind: VSphereMachineTemplate
2020
name: ${CLUSTER_CLASS_NAME}-template
21-
namespace: '${NAMESPACE}'
2221
ref:
2322
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
2423
kind: KubeadmControlPlaneTemplate
2524
name: ${CLUSTER_CLASS_NAME}-controlplane
26-
namespace: '${NAMESPACE}'
2725
infrastructure:
2826
ref:
2927
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
3028
kind: VSphereClusterTemplate
3129
name: '${CLUSTER_CLASS_NAME}'
32-
namespace: '${NAMESPACE}'
3330
patches:
3431
- definitions:
3532
- jsonPatches:
@@ -251,13 +248,11 @@ spec:
251248
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
252249
kind: KubeadmConfigTemplate
253250
name: ${CLUSTER_CLASS_NAME}-worker-bootstrap-template
254-
namespace: '${NAMESPACE}'
255251
infrastructure:
256252
ref:
257253
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
258254
kind: VSphereMachineTemplate
259255
name: ${CLUSTER_CLASS_NAME}-worker-machinetemplate
260-
namespace: '${NAMESPACE}'
261256
metadata: {}
262257
---
263258
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1

test/e2e/config/vsphere.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ providers:
2727
type: CoreProvider
2828
versions:
2929
- name: "v1.11.99"
30-
value: "https://storage.googleapis.com/k8s-staging-cluster-api/components/nightly_main_20250528/core-components.yaml"
30+
value: "https://storage.googleapis.com/k8s-staging-cluster-api/components/v1.11.0-alpha.1/core-components.yaml"
3131
type: "url"
3232
contract: v1beta2
3333
files:
@@ -67,7 +67,7 @@ providers:
6767
type: BootstrapProvider
6868
versions:
6969
- name: "v1.11.99"
70-
value: "https://storage.googleapis.com/k8s-staging-cluster-api/components/nightly_main_20250528/bootstrap-components.yaml"
70+
value: "https://storage.googleapis.com/k8s-staging-cluster-api/components/v1.11.0-alpha.1/bootstrap-components.yaml"
7171
type: "url"
7272
contract: v1beta2
7373
files:
@@ -107,7 +107,7 @@ providers:
107107
type: ControlPlaneProvider
108108
versions:
109109
- name: "v1.11.99"
110-
value: "https://storage.googleapis.com/k8s-staging-cluster-api/components/nightly_main_20250528/control-plane-components.yaml"
110+
value: "https://storage.googleapis.com/k8s-staging-cluster-api/components/v1.11.0-alpha.1/control-plane-components.yaml"
111111
type: "url"
112112
contract: v1beta2
113113
files:

test/framework/ip/incluster.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import (
3030
"github.com/vmware/govmomi"
3131
"github.com/vmware/govmomi/find"
3232
"github.com/vmware/govmomi/vim25/mo"
33-
corev1 "k8s.io/api/core/v1"
3433
apierrors "k8s.io/apimachinery/pkg/api/errors"
3534
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3635
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
@@ -39,7 +38,6 @@ import (
3938
"k8s.io/apimachinery/pkg/util/rand"
4039
"k8s.io/apimachinery/pkg/util/wait"
4140
"k8s.io/klog/v2"
42-
"k8s.io/utils/ptr"
4341
ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2"
4442
. "sigs.k8s.io/cluster-api/test/framework/ginkgoextensions"
4543
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -173,7 +171,7 @@ func (h *inCluster) ClaimIPs(ctx context.Context, opts ...ClaimOption) (AddressC
173171
if options.prefixVariableName != "" {
174172
// Set the prefix variable if requested to the prefix of the control plane IP.
175173
Byf("Setting clusterctl variable %s to %s", options.prefixVariableName, ip.Spec.Gateway)
176-
variables[options.prefixVariableName] = strconv.Itoa(ip.Spec.Prefix)
174+
variables[options.prefixVariableName] = strconv.Itoa(int(ip.Spec.Prefix))
177175
}
178176
}
179177
}
@@ -348,8 +346,8 @@ func (h *inCluster) claimIPAddress(ctx context.Context) (_ *ipamv1.IPAddress, _
348346
Annotations: map[string]string{},
349347
},
350348
Spec: ipamv1.IPAddressClaimSpec{
351-
PoolRef: corev1.TypedLocalObjectReference{
352-
APIGroup: ptr.To(h.ipPool.GroupVersionKind().Group),
349+
PoolRef: ipamv1.IPPoolReference{
350+
APIGroup: h.ipPool.GroupVersionKind().Group,
353351
Kind: h.ipPool.GroupVersionKind().Kind,
354352
Name: h.ipPool.GetName(),
355353
},

0 commit comments

Comments
 (0)