Skip to content

Bump cluster-api to v1.11.1 and support v1beta2 api - #325

Closed
changjjjjjjj wants to merge 1 commit into
kubernetes-sigs:mainfrom
petasus-ai:main
Closed

changjjjjjjj wants to merge 1 commit into
kubernetes-sigs:mainfrom
petasus-ai:main

Conversation

@changjjjjjjj

@changjjjjjjj changjjjjjjj commented Sep 10, 2025 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

  • Bump cluster api version to v1.11.1
  • Support cluster api v1beta2, especially for conditions (it changed from clusterv1.conditions to metav1.condition)
  • module updates for CVEs
  • Use golangci-lint v2 and fix all lint errors

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #321

Special notes for your reviewer:

Release notes:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 10, 2025
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: changjjjjjjj
Once this PR has been reviewed and has the lgtm label, please assign nunnatsa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 10, 2025
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 10, 2025
@changjjjjjjj

Copy link
Copy Markdown
Contributor Author

Hi @qinqon @nunnatsa, would you please check this PR since current CAPK doesn't work on the latest CAPI

@nunnatsa

Copy link
Copy Markdown
Contributor

//ok-to-test

@nunnatsa

Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Sep 15, 2025
@nunnatsa

Copy link
Copy Markdown
Contributor

/override build/coverage

@nunnatsa

Copy link
Copy Markdown
Contributor

/override "build / coverage"

@nunnatsa

Copy link
Copy Markdown
Contributor

@changjjjjjjj it seems like the e2e test is broken. I'll try to fix it later today.

@nunnatsa

Copy link
Copy Markdown
Contributor

/override "build / coverage (pull_request)"

@coveralls

coveralls commented Sep 16, 2025 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 17761358176

Details

  • 109 of 205 (53.17%) changed or added relevant lines in 16 files are covered.
  • 506 unchanged lines in 12 files lost coverage.
  • Overall coverage decreased (-18.8%) to 40.14%

Changes Missing Coverage Covered Lines Changed/Added Lines %
controllers/kubevirtmachine_controller.go 81 82 98.78%
api/v1alpha1/kubevirtcluster_types.go 0 2 0.0%
api/v1alpha1/kubevirtmachine_types.go 0 2 0.0%
main.go 0 2 0.0%
pkg/workloadcluster/workloadcluster.go 0 2 0.0%
pkg/kubevirt/utils.go 7 10 70.0%
pkg/ssh/ssh_command_executor.go 0 5 0.0%
api/v1alpha1/zz_generated.deepcopy.go 0 6 0.0%
pkg/ssh/utils.go 0 7 0.0%
pkg/testing/common.go 0 8 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/ssh/utils.go 1 51.47%
api/v1alpha1/kubevirtclustertemplate_types.go 3 0.0%
api/v1alpha1/kubevirtmachinetemplate_types.go 3 0.0%
api/v1alpha1/kubevirtcluster_types.go 7 0.0%
api/v1alpha1/kubevirtmachine_types.go 7 0.0%
pkg/context/cluster_context.go 10 0.0%
pkg/infracluster/mock/infracluster_generated.go 20 0.0%
pkg/workloadcluster/mock/workloadcluster_generated.go 30 0.0%
pkg/context/machine_context.go 32 0.0%
api/v1alpha1/zz_generated.deepcopy.go 99 0.0%
Totals Coverage Status
Change from base Build 16778497835: -18.8%
Covered Lines: 1091
Relevant Lines: 2718

💛 - Coveralls

@nunnatsa nunnatsa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this, @changjjjjjjj

Added some inline comments.

Comment thread .golangci.yml
Comment thread .golangci.yml
Comment thread .golangci.yml
@@ -1,19 +1,17 @@
linters-settings:
ginkgolinter:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do need this setting

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linter-settings option is migrated to settings. I added it again. Thanks

@changjjjjjjj
changjjjjjjj force-pushed the main branch 4 times, most recently from 863d649 to d6a0e15 Compare September 16, 2025 08:44
@changjjjjjjj

Copy link
Copy Markdown
Contributor Author

Hi @nunnatsa, I'm having problem dealing with some e2e test cases.

  1. [FAIL] CreateCluster [It] should remediate a running VMI marked as being in a terminal state [ephemeralVMs, terminal]: I think remediating with terminal label doesn't work. It only adds failureReason but doesn't delete VMI (I've tested it in v0.1.10 too).
  2. [FAIL] CreateCluster [It] should remediate failed unrecoverable VMI [ephemeralVMs]
  3. [FAIL] CreateCluster [It] creates a simple externally managed cluster ephemeral VMs [ephemeralVMs, externallyManaged]
    I have no idea with these two cases. In my environment, it works perfectly with CAPI v1.11.1.
    I would be glad if you give me some advice

@nunnatsa

Copy link
Copy Markdown
Contributor

Hi @changjjjjjjj - I opened a new PR based on yours, and made some changes to make it work. It's now finally working.

Could you please review #328 ?

@nunnatsa

Copy link
Copy Markdown
Contributor

Hi @changjjjjjjj - I opened a new PR based on yours, and made some changes to make it work. It's now finally working.

Could you please review #328 ?

Got LGTM. Thanks for your PR and hard work, @changjjjjjjj !!

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 25, 2025
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@changjjjjjjj

Copy link
Copy Markdown
Contributor Author

@nunnatsa Thanks for the fixes. I will close this PR.

nunnatsa pushed a commit to nunnatsa/cluster-api-provider-kubevirt that referenced this pull request Jan 11, 2026
ACM-26849: fix: mce-29 - Konflux compliance failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CAPI v1.11.0-beta.0 has been released and is ready for testing

4 participants