-
Notifications
You must be signed in to change notification settings - Fork 71
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
Improve OpenAPI validation and SSA Golang markers #477
Conversation
@@ -59,6 +59,9 @@ type BundleList struct { | |||
// BundleSpec defines the desired state of a Bundle. | |||
type BundleSpec struct { | |||
// Sources is a set of references to data whose data will sync to the target. | |||
// +listType=atomic | |||
// +kubebuilder:validation:MinItems=1 | |||
// +kubebuilder:validation:MaxItems=100 |
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.
MaxItems is added to pass the cost requirements when CEL validations are added to the API.
@@ -67,6 +70,7 @@ type BundleSpec struct { | |||
|
|||
// BundleSource is the set of sources whose data will be appended and synced to | |||
// the BundleTarget in all Namespaces. | |||
// +structType=atomic |
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.
👍
Signed-off-by: Erik Godding Boye <[email protected]>
63f265c
to
a25aa22
Compare
Great work, this is something that could be useful in our other APIs too. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: inteon 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 |
Yeah, I am going on a "round around the block". But I need static CRDs in Git first. 😉 |
The proposed changes are extracted from #475. Before introducing CEL in the API specification, which will lift the K8s version requirements, I propose adding more "simple" validations to the API spec. Also adding processing instructions to API to ensure it will work smoothly for users using SSA.