Skip to content

Commit 03ba7dc

Browse files
committed
Bump to CAPI 2025.07.18
1 parent 21f70b3 commit 03ba7dc

File tree

27 files changed

+120
-117
lines changed

27 files changed

+120
-117
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
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 := 724130883ae32b68251a749981f6ba2b1cbfd3ce # Note: this the commit ID for CAPI v1.11.0-beta.0.
193+
CAPI_HACK_TOOLS_VER := f330cf22da5e0f0f3ff4d4fef14856d4512d796e # Note: this the commit ID for CAPI main 2025.07.18.
194194

195195
BOSKOSCTL_BIN := boskosctl
196196
BOSKOSCTL := $(abspath $(TOOLS_BIN_DIR)/$(BOSKOSCTL_BIN))

controllers/vmware/test/controllers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func deployCluster(namespace string, k8sClient client.Client) (client.ObjectKey,
138138
Finalizers: []string{"test"},
139139
},
140140
Spec: clusterv1.ClusterSpec{
141-
ClusterNetwork: &clusterv1.ClusterNetwork{
141+
ClusterNetwork: clusterv1.ClusterNetwork{
142142
ServiceDomain: "service.domain",
143143
},
144144
},

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-beta.0
5+
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.11.0-beta.0.0.20250718131826-f330cf22da5e
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
@@ -380,8 +380,8 @@ k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6J
380380
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
381381
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM=
382382
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
383-
sigs.k8s.io/cluster-api v1.11.0-beta.0 h1:ZeNA21YseFk+yPemaK0oqjWycx71RWY45h1sQgpD9rY=
384-
sigs.k8s.io/cluster-api v1.11.0-beta.0/go.mod h1:GJoz9vNDDp7jH4fM9E5glu3zc0INdlL69nYBaYu3bt4=
383+
sigs.k8s.io/cluster-api v1.11.0-beta.0.0.20250718131826-f330cf22da5e h1:+hBsJ6q1DlTn7l7Scfa5YsjZI+mq9QpQw/7zDA3GxLA=
384+
sigs.k8s.io/cluster-api v1.11.0-beta.0.0.20250718131826-f330cf22da5e/go.mod h1:GJoz9vNDDp7jH4fM9E5glu3zc0INdlL69nYBaYu3bt4=
385385
sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=
386386
sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=
387387
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=

internal/test/helpers/vmware/intg_test_context.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ func generateCluster(namespace, name string) *clusterv1.Cluster {
193193
Name: fmt.Sprintf("%s-%s", name, capiutil.RandomString(6)),
194194
},
195195
Spec: clusterv1.ClusterSpec{
196-
ClusterNetwork: &clusterv1.ClusterNetwork{
197-
Pods: &clusterv1.NetworkRanges{
196+
ClusterNetwork: clusterv1.ClusterNetwork{
197+
Pods: clusterv1.NetworkRanges{
198198
CIDRBlocks: []string{"1.0.0.0/16"},
199199
},
200-
Services: &clusterv1.NetworkRanges{
200+
Services: clusterv1.NetworkRanges{
201201
CIDRBlocks: []string{"2.0.0.0/16"},
202202
},
203203
},

internal/webhooks/vspheremachinetemplate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (webhook *VSphereMachineTemplate) ValidateUpdate(ctx context.Context, oldRa
113113
}
114114

115115
var allErrs field.ErrorList
116-
if !topology.ShouldSkipImmutabilityChecks(req, newTyped) &&
116+
if !topology.IsDryRunRequest(req, newTyped) &&
117117
!reflect.DeepEqual(newTyped.Spec.Template.Spec, oldTyped.Spec.Template.Spec) {
118118
allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "template", "spec"), newTyped, machineTemplateImmutableMsg))
119119
}

packaging/flavorgen/flavors/clusterclass_generators.go

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,18 @@ func getWorkersClass() clusterv1.WorkersClass {
123123
MachineDeployments: []clusterv1.MachineDeploymentClass{
124124
{
125125
Class: fmt.Sprintf("%s-worker", env.ClusterClassNameVar),
126-
Template: clusterv1.MachineDeploymentClassTemplate{
127-
Bootstrap: clusterv1.MachineDeploymentClassBootstrapTemplate{
128-
TemplateRef: clusterv1.ClusterClassTemplateReference{
129-
APIVersion: bootstrapv1.GroupVersion.String(),
130-
Kind: util.TypeToKind(&bootstrapv1.KubeadmConfigTemplate{}),
131-
Name: fmt.Sprintf("%s-worker-bootstrap-template", env.ClusterClassNameVar),
132-
},
126+
Bootstrap: clusterv1.MachineDeploymentClassBootstrapTemplate{
127+
TemplateRef: clusterv1.ClusterClassTemplateReference{
128+
APIVersion: bootstrapv1.GroupVersion.String(),
129+
Kind: util.TypeToKind(&bootstrapv1.KubeadmConfigTemplate{}),
130+
Name: fmt.Sprintf("%s-worker-bootstrap-template", env.ClusterClassNameVar),
133131
},
134-
Infrastructure: clusterv1.MachineDeploymentClassInfrastructureTemplate{
135-
TemplateRef: clusterv1.ClusterClassTemplateReference{
136-
Kind: util.TypeToKind(&infrav1.VSphereMachineTemplate{}),
137-
Name: fmt.Sprintf("%s-worker-machinetemplate", env.ClusterClassNameVar),
138-
APIVersion: infrav1.GroupVersion.String(),
139-
},
132+
},
133+
Infrastructure: clusterv1.MachineDeploymentClassInfrastructureTemplate{
134+
TemplateRef: clusterv1.ClusterClassTemplateReference{
135+
Kind: util.TypeToKind(&infrav1.VSphereMachineTemplate{}),
136+
Name: fmt.Sprintf("%s-worker-machinetemplate", env.ClusterClassNameVar),
137+
APIVersion: infrav1.GroupVersion.String(),
140138
},
141139
},
142140
},
@@ -149,20 +147,18 @@ func getVMWareWorkersClass() clusterv1.WorkersClass {
149147
MachineDeployments: []clusterv1.MachineDeploymentClass{
150148
{
151149
Class: fmt.Sprintf("%s-worker", env.ClusterClassNameVar),
152-
Template: clusterv1.MachineDeploymentClassTemplate{
153-
Bootstrap: clusterv1.MachineDeploymentClassBootstrapTemplate{
154-
TemplateRef: clusterv1.ClusterClassTemplateReference{
155-
APIVersion: bootstrapv1.GroupVersion.String(),
156-
Kind: util.TypeToKind(&bootstrapv1.KubeadmConfigTemplate{}),
157-
Name: fmt.Sprintf("%s-worker-bootstrap-template", env.ClusterClassNameVar),
158-
},
150+
Bootstrap: clusterv1.MachineDeploymentClassBootstrapTemplate{
151+
TemplateRef: clusterv1.ClusterClassTemplateReference{
152+
APIVersion: bootstrapv1.GroupVersion.String(),
153+
Kind: util.TypeToKind(&bootstrapv1.KubeadmConfigTemplate{}),
154+
Name: fmt.Sprintf("%s-worker-bootstrap-template", env.ClusterClassNameVar),
159155
},
160-
Infrastructure: clusterv1.MachineDeploymentClassInfrastructureTemplate{
161-
TemplateRef: clusterv1.ClusterClassTemplateReference{
162-
Kind: util.TypeToKind(&vmwarev1.VSphereMachineTemplate{}),
163-
Name: fmt.Sprintf("%s-worker-machinetemplate", env.ClusterClassNameVar),
164-
APIVersion: vmwarev1.GroupVersion.String(),
165-
},
156+
},
157+
Infrastructure: clusterv1.MachineDeploymentClassInfrastructureTemplate{
158+
TemplateRef: clusterv1.ClusterClassTemplateReference{
159+
Kind: util.TypeToKind(&vmwarev1.VSphereMachineTemplate{}),
160+
Name: fmt.Sprintf("%s-worker-machinetemplate", env.ClusterClassNameVar),
161+
APIVersion: vmwarev1.GroupVersion.String(),
166162
},
167163
},
168164
},

packaging/flavorgen/flavors/generators.go

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func newClusterTopologyCluster(supervisorMode bool) (clusterv1.Cluster, error) {
127127
ControlPlane: clusterv1.ControlPlaneTopology{
128128
Replicas: ptr.To[int32](1),
129129
},
130-
Workers: &clusterv1.WorkersTopology{
130+
Workers: clusterv1.WorkersTopology{
131131
MachineDeployments: []clusterv1.MachineDeploymentTopology{
132132
{
133133
Class: fmt.Sprintf("%s-worker", env.ClusterClassNameVar),
@@ -280,8 +280,8 @@ func newCluster(vsphereCluster client.Object, controlPlane *controlplanev1.Kubea
280280
Labels: clusterLabels(),
281281
},
282282
Spec: clusterv1.ClusterSpec{
283-
ClusterNetwork: &clusterv1.ClusterNetwork{
284-
Pods: &clusterv1.NetworkRanges{
283+
ClusterNetwork: clusterv1.ClusterNetwork{
284+
Pods: clusterv1.NetworkRanges{
285285
CIDRBlocks: []string{env.DefaultClusterCIDR},
286286
},
287287
},
@@ -711,10 +711,12 @@ func newKubeadmControlplane(infraTemplate client.Object, files []bootstrapv1.Fil
711711
Spec: controlplanev1.KubeadmControlPlaneSpec{
712712
Version: env.KubernetesVersionVar,
713713
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
714-
InfrastructureRef: clusterv1.ContractVersionedObjectReference{
715-
APIGroup: infraTemplate.GetObjectKind().GroupVersionKind().Group,
716-
Kind: infraTemplate.GetObjectKind().GroupVersionKind().Kind,
717-
Name: infraTemplate.GetName(),
714+
Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
715+
InfrastructureRef: clusterv1.ContractVersionedObjectReference{
716+
APIGroup: infraTemplate.GetObjectKind().GroupVersionKind().Group,
717+
Kind: infraTemplate.GetObjectKind().GroupVersionKind().Kind,
718+
Name: infraTemplate.GetName(),
719+
},
718720
},
719721
},
720722
KubeadmConfigSpec: defaultKubeadmInitSpec(files),
@@ -735,10 +737,12 @@ func newIgnitionKubeadmControlplane(infraTemplate infrav1.VSphereMachineTemplate
735737
Spec: controlplanev1.KubeadmControlPlaneSpec{
736738
Version: env.KubernetesVersionVar,
737739
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
738-
InfrastructureRef: clusterv1.ContractVersionedObjectReference{
739-
APIGroup: infraTemplate.GroupVersionKind().Group,
740-
Kind: infraTemplate.Kind,
741-
Name: infraTemplate.Name,
740+
Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
741+
InfrastructureRef: clusterv1.ContractVersionedObjectReference{
742+
APIGroup: infraTemplate.GroupVersionKind().Group,
743+
Kind: infraTemplate.Kind,
744+
Name: infraTemplate.Name,
745+
},
742746
},
743747
},
744748
KubeadmConfigSpec: ignitionKubeadmInitSpec(files),

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-beta.0
5+
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.11.0-beta.0.0.20250718131826-f330cf22da5e
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
@@ -240,8 +240,8 @@ k8s.io/kube-openapi v0.0.0-20250610211856-8b98d1ed966a h1:ZV3Zr+/7s7aVbjNGICQt+p
240240
k8s.io/kube-openapi v0.0.0-20250610211856-8b98d1ed966a/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
241241
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
242242
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
243-
sigs.k8s.io/cluster-api v1.11.0-beta.0 h1:ZeNA21YseFk+yPemaK0oqjWycx71RWY45h1sQgpD9rY=
244-
sigs.k8s.io/cluster-api v1.11.0-beta.0/go.mod h1:GJoz9vNDDp7jH4fM9E5glu3zc0INdlL69nYBaYu3bt4=
243+
sigs.k8s.io/cluster-api v1.11.0-beta.0.0.20250718131826-f330cf22da5e h1:+hBsJ6q1DlTn7l7Scfa5YsjZI+mq9QpQw/7zDA3GxLA=
244+
sigs.k8s.io/cluster-api v1.11.0-beta.0.0.20250718131826-f330cf22da5e/go.mod h1:GJoz9vNDDp7jH4fM9E5glu3zc0INdlL69nYBaYu3bt4=
245245
sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=
246246
sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=
247247
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=

0 commit comments

Comments
 (0)