-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 validation for default, enum and example definitions in variables #5835
🌱 add validation for default, enum and example definitions in variables #5835
Conversation
internal/topology/variables/clusterclass_variable_validation.go
Outdated
Show resolved
Hide resolved
I think we should restructure. The current recursion is not ideal (before this PR) ~ something like:
Let's pair if possible. |
dcb16cd
to
f376867
Compare
internal/topology/variables/clusterclass_variable_validation.go
Outdated
Show resolved
Hide resolved
internal/topology/variables/clusterclass_variable_validation.go
Outdated
Show resolved
Hide resolved
245f8d4
to
7d47953
Compare
7d47953
to
80de47e
Compare
internal/topology/variables/clusterclass_variable_validation.go
Outdated
Show resolved
Hide resolved
internal/topology/variables/clusterclass_variable_validation_test.go
Outdated
Show resolved
Hide resolved
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.
changes lgtm, I will make another past on tests
8d2f47e
to
d1a7295
Compare
lgtm pending squash |
Co-authored-by: Stefan Büringer [email protected] Signed-off-by: killianmuldoon <[email protected]>
d1a7295
to
b87d084
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
This PR adds schema validation for values defined for default, enum and example in a ClusterClass variable.
e.g.
If a user defines a schema with an integer and minimum value 1 a default, example or enum member of -100 will be found to be invalid and the ClusterClass will be rejected on creation or update.
It also removes the Kubernetes CRD default validation that was part of the code previously.
Fixes #5831