Skip to content

Commit f64f569

Browse files
committed
sync upstream 2025-09-29
2 parents da57013 + b1ad7ed commit f64f569

Some content is hidden

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

43 files changed

+1139
-674
lines changed

.github/workflows/create_release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
run: |
4747
make create-infrastructure-components
4848
- name: Create Release
49-
uses: softprops/action-gh-release@v1
49+
uses: softprops/action-gh-release@v2
5050
with:
5151
generate_release_notes: true
5252
fail_on_unmatched_files: true

.github/workflows/test.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ jobs:
4646
if: github.repository == 'kubernetes-sigs/cluster-api-provider-kubevirt'
4747
runs-on: ubuntu-latest
4848
steps:
49-
- uses: actions/checkout@v3
50-
- name: Install Go
51-
uses: actions/setup-go@v5
52-
with:
53-
go-version-file: go.mod
54-
- name: golangci-lint
55-
uses: golangci/golangci-lint-action@v6
56-
with:
57-
args: --timeout=5m -v
58-
version: v1.63.4
49+
- uses: actions/checkout@v4
50+
- name: Install Go
51+
uses: actions/setup-go@v5
52+
with:
53+
go-version-file: go.mod
54+
- name: golangci-lint
55+
uses: golangci/golangci-lint-action@v7
56+
with:
57+
args: --timeout=5m -v
58+
version: v2.4.0
5959

6060
check-gen:
6161
if: github.repository == 'kubernetes-sigs/cluster-api-provider-kubevirt'

.golangci.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
linters-settings:
2-
ginkgolinter:
3-
forbid-focus-container: true
4-
1+
version: "2"
2+
run:
3+
timeout: 10m
4+
go: "1.24"
5+
build-tags:
6+
- tools
7+
- e2e
8+
allow-parallel-runners: true
59
linters:
610
enable:
711
- errcheck
812
- ginkgolinter
9-
- gosimple
1013
- govet
1114
- ineffassign
1215
- staticcheck
13-
- typecheck
1416
- unused
17+
settings:
18+
ginkgolinter:
19+
forbid-focus-container: true
1520
disable: []
16-
17-
issues:
18-
exclude:
19-
- SA1019 # todo remove the exclude parameter when issue #85 is resolved

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# Build the manager binary
1818
# Run this with docker build --build-arg builder_image=<golang:x.y.z>
19-
ARG builder_image=docker.io/golang:1.23
19+
ARG builder_image=docker.io/golang:1.24
2020
FROM ${builder_image} as builder
2121
WORKDIR /workspace
2222

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ generate-go: $(CONTROLLER_GEN) $(CONVERSION_GEN) ## Runs Go related generate tar
182182
paths=./api/...
183183
(IFS=','; for i in "./api/v1alpha1"; do find $$i -type f -name 'zz_generated.conversion*' -exec rm -f {} \;; done)
184184
$(CONVERSION_GEN) \
185-
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1beta1 \
185+
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/core/v1beta2 \
186186
--output-file=zz_generated.conversion.go \
187187
--go-header-file=hack/boilerplate.generatego.txt \
188188
sigs.k8s.io/cluster-api-provider-kubevirt/api/v1alpha1
@@ -340,7 +340,7 @@ goimports:
340340

341341
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
342342
golangci-lint: ## Download golangci-lint locally if necessary.
343-
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4)
343+
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0)
344344

345345
.PHONY: linter
346346
linter: golangci-lint

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ We also encourage ALL active community participants to act as if they are mainta
3333

3434
### Other ways to communicate with the maintainers
3535

36-
Please check in with us in the [#cluster-api-kubevirt](https://sigs.k8s.io/cluster-api-provider-kubevirt). You can also join our [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-dev)
36+
Please check in with us in the [#cluster-api-kubevirt](https://kubernetes.slack.com/archives/C02EBC8984E). You can also join our [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-dev)
3737

3838
## Github Issues
3939

api/v1alpha1/condition_consts.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ limitations under the License.
1616

1717
package v1alpha1
1818

19-
import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
20-
2119
// Conditions and condition Reasons for the KubevirtMachine object
2220

2321
const (
2422
// VMProvisionedCondition documents the status of the provisioning of the VM
2523
// generated by a KubevirtMachine.
26-
VMProvisionedCondition clusterv1.ConditionType = "VMProvisioned"
24+
VMProvisionedCondition = "VMProvisioned"
2725

2826
// WaitingForClusterInfrastructureReason (Severity=Info) documents a KubevirtMachine waiting for the cluster
2927
// infrastructure to be ready before starting to create the container that provides the KubevirtMachine
@@ -39,15 +37,15 @@ const (
3937
VMCreateFailedReason = "VMCreateFailed"
4038

4139
// VMLiveMigratableCondition documents whether the VM is live-migratable or not
42-
VMLiveMigratableCondition clusterv1.ConditionType = "VMLiveMigratable"
40+
VMLiveMigratableCondition = "VMLiveMigratable"
4341
)
4442

4543
const (
4644
// BootstrapExecSucceededCondition provides an observation of the KubevirtMachine bootstrap process.
4745
// It is set based on successful execution of bootstrap commands and on the existence of
4846
// the /run/cluster-api/bootstrap-success.complete file.
4947
// The condition gets generated after VMProvisionedCondition is True.
50-
BootstrapExecSucceededCondition clusterv1.ConditionType = "BootstrapExecSucceeded"
48+
BootstrapExecSucceededCondition = "BootstrapExecSucceeded"
5149

5250
// BootstrappingReason documents (Severity=Info) a KubevirtMachine currently executing the bootstrap
5351
// script that creates the Kubernetes node on the newly provisioned machine infrastructure.
@@ -63,7 +61,7 @@ const (
6361

6462
const (
6563
// LoadBalancerAvailableCondition documents the availability of the service that implements the cluster load balancer.
66-
LoadBalancerAvailableCondition clusterv1.ConditionType = "LoadBalancerAvailable"
64+
LoadBalancerAvailableCondition = "LoadBalancerAvailable"
6765

6866
// LoadBalancerProvisioningFailedReason (Severity=Warning) documents a KubevirtCluster controller detecting
6967
// an error while provisioning the service that provides the cluster load balancer; those kind of

api/v1alpha1/kubevirtcluster_types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package v1alpha1
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+
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
2323
)
2424

2525
const (
@@ -28,7 +28,7 @@ const (
2828
ClusterFinalizer = "kubevirtcluster.infrastructure.cluster.x-k8s.io"
2929
)
3030

31-
const ( //labels
31+
const ( // labels
3232
KubevirtMachineNameLabel = "capk.cluster.x-k8s.io/kubevirt-machine-name"
3333
KubevirtMachineNamespaceLabel = "capk.cluster.x-k8s.io/kubevirt-machine-namespace"
3434

@@ -74,11 +74,11 @@ type KubevirtClusterStatus struct {
7474

7575
// FailureDomains don't mean much in CAPD since it's all local, but we can see how the rest of cluster API
7676
// will use this if we populate it.
77-
FailureDomains clusterv1.FailureDomains `json:"failureDomains,omitempty"`
77+
FailureDomains []clusterv1.FailureDomain `json:"failureDomains,omitempty"`
7878

7979
// Conditions defines current service state of the KubevirtCluster.
8080
// +optional
81-
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
81+
Conditions []metav1.Condition `json:"conditions,omitempty"`
8282
}
8383

8484
// APIEndpoint represents a reachable Kubernetes API endpoint.
@@ -140,11 +140,11 @@ type KubevirtCluster struct {
140140
Status KubevirtClusterStatus `json:"status,omitempty"`
141141
}
142142

143-
func (c *KubevirtCluster) GetConditions() clusterv1.Conditions {
143+
func (c *KubevirtCluster) GetConditions() []metav1.Condition {
144144
return c.Status.Conditions
145145
}
146146

147-
func (c *KubevirtCluster) SetConditions(conditions clusterv1.Conditions) {
147+
func (c *KubevirtCluster) SetConditions(conditions []metav1.Condition) {
148148
c.Status.Conditions = conditions
149149
}
150150

api/v1alpha1/kubevirtclustertemplate_types.go

Lines changed: 1 addition & 1 deletion
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+
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
2222
)
2323

2424
// KubevirtClusterTemplateResource describes the data needed to create a KubevirtCluster from a template.

api/v1alpha1/kubevirtmachine_types.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import (
2020
corev1 "k8s.io/api/core/v1"
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2222
kubevirtv1 "kubevirt.io/api/core/v1"
23-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
24-
"sigs.k8s.io/cluster-api/errors"
23+
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
2524
)
2625

2726
const (
@@ -85,7 +84,7 @@ type KubevirtMachineStatus struct {
8584

8685
// Conditions defines current service state of the KubevirtMachine.
8786
// +optional
88-
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
87+
Conditions []metav1.Condition `json:"conditions,omitempty"`
8988

9089
// NodeUpdated denotes that the ProviderID is updated on Node of this KubevirtMachine
9190
// +optional
@@ -108,7 +107,7 @@ type KubevirtMachineStatus struct {
108107
// can be added as events to the Machine object and/or logged in the
109108
// controller's output.
110109
// +optional
111-
FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"`
110+
FailureReason string `json:"failureReason,omitempty"`
112111

113112
// FailureMessage will be set in the event that there is a terminal problem
114113
// reconciling the Machine and will contain a more verbose string suitable
@@ -146,11 +145,11 @@ type KubevirtMachine struct {
146145
Status KubevirtMachineStatus `json:"status,omitempty"`
147146
}
148147

149-
func (c *KubevirtMachine) GetConditions() clusterv1.Conditions {
148+
func (c *KubevirtMachine) GetConditions() []metav1.Condition {
150149
return c.Status.Conditions
151150
}
152151

153-
func (c *KubevirtMachine) SetConditions(conditions clusterv1.Conditions) {
152+
func (c *KubevirtMachine) SetConditions(conditions []metav1.Condition) {
154153
c.Status.Conditions = conditions
155154
}
156155

0 commit comments

Comments
 (0)