Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Update Cluster API IPAM version from v1alpha1 to v1beta1 #2751

Merged

Conversation

PavanNeerudu
Copy link
Contributor

What this PR does / why we need it:

While working with the CAPV, I noticed that the IPAM version used is still v1alpha1. This is despite the fact that the IPAM types have been promoted to v1beta1 in the cluster-api. Additionally, the first release of the Cluster API IPAM provider in-cluster uses v1beta1, leading to an inconsistency in the versions used.

Which issue(s) this PR fixes:
Fixes #2750

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 19, 2024
Copy link

linux-foundation-easycla bot commented Feb 19, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Feb 19, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @PavanNeerudu!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-vsphere 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-vsphere has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @PavanNeerudu. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 19, 2024
@PavanNeerudu PavanNeerudu changed the title Update Cluster API IPAM version from v1alpha1 to v1beta1 🌱 Update Cluster API IPAM version from v1alpha1 to v1beta1 Feb 19, 2024
@PavanNeerudu PavanNeerudu force-pushed the update-capi-ipam-version branch from cf72307 to ca44820 Compare February 19, 2024 12:10
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 19, 2024
@PavanNeerudu PavanNeerudu marked this pull request as ready for review February 19, 2024 12:11
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 19, 2024
@k8s-ci-robot k8s-ci-robot requested a review from yastij February 19, 2024 12:12
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 19, 2024
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, looks straight forward :-)

Some smaller nits.

hack/ipclaim-template.yaml Show resolved Hide resolved
@@ -25,7 +25,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
apitypes "k8s.io/apimachinery/pkg/types"
ipamv1a1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1alpha1"
ipamv1b1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta1"
Copy link
Member

Choose a reason for hiding this comment

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

please rename this to ipamv1, maybe worth enforcing this via .golangci.yml like we already do for other apis?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, sure. Added a rule to .golangci.yml as well.

Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.99%. Comparing base (091f636) to head (bdd2890).
Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2751      +/-   ##
==========================================
- Coverage   64.26%   63.99%   -0.27%     
==========================================
  Files         160      160              
  Lines        9338     9338              
==========================================
- Hits         6001     5976      -25     
- Misses       2886     2904      +18     
- Partials      451      458       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -39,7 +39,7 @@ import (
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog/v2"
"k8s.io/utils/ptr"
ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1alpha1"
ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta1"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we need to keep the old api group for now for the test code, because in CI v1beta1 is not yet deployed (it is only used for IPAM and thus may be not up to date.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, makes sense. I was just looking at why the tests were failing and how the testing framework is constructed. Thanks!

@chrischdi
Copy link
Member

/test pull-cluster-api-provider-vsphere-test-main

Unrelated flake, which gets hopefully fixed in:

Copy link
Contributor

@zhanggbj zhanggbj left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
/lgtm
Waiting @chrischdi for another review and approval.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 20, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: ac1529614a8c8dbb414a9206f8f6dac676ac6139

@chrischdi
Copy link
Member

Because we don't have any e2e test covering ipam: have you been able to give the implementation a try to create a cluster using IPAM?

@chrischdi
Copy link
Member

We now have a proper test (via #2757) :-)

/test pull-cluster-api-provider-vsphere-e2e-main

@chrischdi
Copy link
Member

Test is green 🎉

Thanks for contributing this!

/tide merge-method squash

@chrischdi
Copy link
Member

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Feb 26, 2024
@chrischdi
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi

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

The pull request process is described here

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 26, 2024
@chrischdi
Copy link
Member

/retest

flake

@k8s-ci-robot k8s-ci-robot merged commit 9a3e4ea into kubernetes-sigs:main Feb 26, 2024
20 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.10 milestone Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Cluster API IPAM version from v1alpha1 to v1beta1 in CAPV
4 participants