Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # tag=v6.1.1
with:
version: v1.60.2
version: v1.64.3
args: --out-format=colored-line-number
working-directory: ${{matrix.working-directory}}
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ linters:
- durationcheck
- errcheck
- errchkjson
- exportloopref
- gci
- ginkgolinter
- goconst
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SHELL:=/usr/bin/env bash
#
# Go.
#
GO_VERSION ?= 1.23.12
GO_VERSION ?= 1.24.10
GO_DIRECTIVE_VERSION ?= 1.22.0
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)

Expand Down
5 changes: 1 addition & 4 deletions controllers/vspherecluster_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,7 @@ func (r *clusterReconciler) controlPlaneMachineToCluster(ctx context.Context, o
}

return []ctrl.Request{{
NamespacedName: types.NamespacedName{
Namespace: vsphereClusterKey.Namespace,
Name: vsphereClusterKey.Name,
},
NamespacedName: vsphereClusterKey,
}}
}

Expand Down
8 changes: 4 additions & 4 deletions controllers/vspherecluster_reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ var _ = Describe("VIM based VSphere ClusterReconciler", func() {
// Make sure the VSphereCluster exists.
Eventually(func() error {
return testEnv.Get(ctx, key, instance)
}, timeout).Should(BeNil())
}, timeout).Should(Succeed())

By("setting the OwnerRef on the VSphereCluster")
Eventually(func() error {
Expand All @@ -132,7 +132,7 @@ var _ = Describe("VIM based VSphere ClusterReconciler", func() {
UID: "blah",
})
return ph.Patch(ctx, instance, patch.WithStatusObservedGeneration{})
}, timeout).Should(BeNil())
}, timeout).Should(Succeed())

Eventually(func() bool {
if err := testEnv.Get(ctx, key, instance); err != nil {
Expand Down Expand Up @@ -395,7 +395,7 @@ var _ = Describe("VIM based VSphere ClusterReconciler", func() {
Expect(err).ShouldNot(HaveOccurred())
zoneOne.Status.Ready = ptr.To(true)
return ph.Patch(ctx, zoneOne, patch.WithStatusObservedGeneration{})
}, timeout).Should(BeNil())
}, timeout).Should(Succeed())

Eventually(func() bool {
if err := testEnv.Get(ctx, key, instance); err != nil {
Expand All @@ -414,7 +414,7 @@ var _ = Describe("VIM based VSphere ClusterReconciler", func() {
Expect(err).ShouldNot(HaveOccurred())
zoneOne.Status.Ready = ptr.To(true)
return ph.Patch(ctx, zoneOne, patch.WithStatusObservedGeneration{})
}, timeout).Should(BeNil())
}, timeout).Should(Succeed())
})

It("should remove the FailureDomainsAvailable condition from the cluster", func() {
Expand Down
4 changes: 2 additions & 2 deletions controllers/vspheremachine_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ var _ = Describe("VsphereMachineReconciler", func() {
Expect(err).ShouldNot(HaveOccurred())
capiCluster.Status.InfrastructureReady = true
return ph.Patch(ctx, capiCluster, patch.WithStatusObservedGeneration{})
}, timeout).Should(BeNil())
}, timeout).Should(Succeed())

Eventually(func() bool {
return isPresentAndFalseWithReason(infraMachine, infrav1.VMProvisionedCondition, infrav1.WaitingForClusterInfrastructureReason)
Expand Down Expand Up @@ -199,7 +199,7 @@ var _ = Describe("VsphereMachineReconciler", func() {
DataSecretName: ptr.To("some-secret"),
}
return ph.Patch(ctx, capiMachine, patch.WithStatusObservedGeneration{})
}, timeout).Should(BeNil())
}, timeout).Should(Succeed())

Eventually(func() int {
vms := infrav1.VSphereVMList{}
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module sigs.k8s.io/cluster-api-provider-vsphere

go 1.22.0

godebug default=go1.22

replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.9.1

replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505
Expand Down
2 changes: 2 additions & 0 deletions packaging/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module sigs.k8s.io/cluster-api-provider-vsphere/packaging

go 1.22.7

godebug default=go1.22

replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.9.1

replace sigs.k8s.io/cluster-api-provider-vsphere => ../
Expand Down
4 changes: 2 additions & 2 deletions pkg/services/govmomi/ipam/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func Test_buildIPAMDeviceConfigs(t *testing.T) {
// The IPAddressClaimed condition should not be added
config, err := buildIPAMDeviceConfigs(ctx, vmCtx, networkStatus)
g.Expect(err).NotTo(gomega.HaveOccurred())
g.Expect(config[0].IPAMAddresses).To(gomega.HaveLen(0))
g.Expect(config[0].IPAMAddresses).To(gomega.BeEmpty())
})
}

Expand Down Expand Up @@ -435,7 +435,7 @@ func Test_BuildState(t *testing.T) {

state, err := BuildState(ctx, vmCtx, networkStatus)
g.Expect(err).NotTo(gomega.HaveOccurred())
g.Expect(state).To(gomega.HaveLen(0))
g.Expect(state).To(gomega.BeEmpty())
})

t.Run("when one device has no pool and is DHCP true, and one device has a IPAddressPool", func(_ *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/multivc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ func VerifyMultiVC(ctx context.Context, input MultiVCenterSpecInput) {
Consistently(func() error {
kubeSystem := &corev1.Namespace{}
return input.Global.BootstrapClusterProxy.GetClient().Get(ctx, client.ObjectKey{Name: "kube-system"}, kubeSystem)
}, "5s", "100ms").Should(BeNil(), "Failed to assert bootstrap API server stability")
}, "5s", "100ms").Should(Succeed(), "Failed to assert bootstrap API server stability")
Consistently(func() error {
kubeSystem := &corev1.Namespace{}
return mgmtClusterProxy.GetClient().Get(ctx, client.ObjectKey{Name: "kube-system"}, kubeSystem)
}, "5s", "100ms").Should(BeNil(), "Failed to assert self-hosted API server stability")
}, "5s", "100ms").Should(Succeed(), "Failed to assert self-hosted API server stability")

// Get the machines of the workloadCluster before it is moved to become self-hosted to make sure that the move did not trigger
// any unexpected rollouts.
Expand Down
2 changes: 2 additions & 0 deletions test/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module sigs.k8s.io/cluster-api-provider-vsphere/test

go 1.22.0

godebug default=go1.22

replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.9.1

replace sigs.k8s.io/cluster-api/test => sigs.k8s.io/cluster-api/test v1.9.1
Expand Down
Loading