-
Notifications
You must be signed in to change notification settings - Fork 430
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
Add "cluster" type to subnet role validation #5133
Add "cluster" type to subnet role validation #5133
Conversation
ba1d03e
to
76ce65f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5133 +/- ##
=======================================
Coverage 51.25% 51.25%
=======================================
Files 273 273
Lines 24651 24651
=======================================
+ Hits 12634 12636 +2
+ Misses 11231 11229 -2
Partials 786 786 ☔ View full report in Codecov by Sentry. |
/cc @nojnhuh @willie-yao |
@@ -473,7 +473,7 @@ type SubnetClassSpec struct { | |||
Name string `json:"name"` | |||
|
|||
// Role defines the subnet role (eg. Node, ControlPlane) | |||
// +kubebuilder:validation:Enum=node;control-plane;bastion;all | |||
// +kubebuilder:validation:Enum=node;control-plane;bastion;cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is something we'd technically have to call a breaking change if all
is no longer valid when it was before. Maybe we have more wiggle room here if all
was never functional anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought of that--someone may have read the source code to figure out that "all" would pass validation. But AFAICT there is no code that handles SubnetRole("all")
, no tests around that, and no constant defined for it, so it was not intentionally functional and didn't act as SubnetCluster
is intended to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @LochanRn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
LGTM label has been added. Git tree hash: fe0a3c964423805dd3b51b9fdc4f409070654935
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nojnhuh 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 |
/cherry-pick release-1.16 |
@mboersma: new pull request created: #5134 In response to this:
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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Adds "cluster" to the valid kubebuilder types for a subnet role, as documented. Apparently we had added "all" instead.
cluster-api-provider-azure/api/v1beta1/types.go
Lines 744 to 745 in 3770549
Which issue(s) this PR fixes:
Fixes #5130
Special notes for your reviewer:
TODOs:
Release note: