-
Notifications
You must be signed in to change notification settings - Fork 202
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
CFE-1065: Add range validation for placementGroupPartition #1265
CFE-1065: Add range validation for placementGroupPartition #1265
Conversation
@chiragkyal: This pull request references CFE-1065 which is a valid jira issue. 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 openshift-eng/jira-lifecycle-plugin repository. |
/assign @JoelSpeed |
pkg/webhooks/machine_webhook.go
Outdated
if providerSpec.PlacementGroupPartition != 0 { | ||
if providerSpec.PlacementGroupPartition < 1 || providerSpec.PlacementGroupPartition > 7 { |
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.
So, actually, the valid range here is < 0 || > 7
right? I think we can trim thing and bring it into one line. Leaving the comments to explain why it is that way
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.
Yes, right. The actual validation (including defaulting) is < 0 || > 7
. I earlier thought it would be easier to read if we kept them in separate lines.
I've updated it now to bring it into one line.
Signed-off-by: chiragkyal <ckyal@redhat.com>
b9d55b5
to
5e77ccd
Compare
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JoelSpeed 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 |
e959540
into
openshift:master
@chiragkyal: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
[ART PR BUILD NOTIFIER] This PR has been included in build ose-machine-api-operator-container-v4.17.0-202407021157.p0.ge959540.assembly.stream.el9 for distgit ose-machine-api-operator. |
As per openshift/api#1897 (comment), we need to add webhook validation to check
placementGroupPartition
must be between 1 and 7