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

Improve OpenAPI validation and SSA Golang markers #477

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Nov 17, 2024

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.

@cert-manager-prow cert-manager-prow bot added the dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. label Nov 17, 2024
@cert-manager-prow cert-manager-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 17, 2024
@@ -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
Copy link
Contributor Author

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
Copy link
Member

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]>
@inteon
Copy link
Member

inteon commented Nov 21, 2024

Great work, this is something that could be useful in our other APIs too.

/approve
/lgtm

@cert-manager-prow cert-manager-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 21, 2024
@cert-manager-prow
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 21, 2024
@cert-manager-prow cert-manager-prow bot merged commit 2461f5d into cert-manager:main Nov 21, 2024
6 checks passed
@erikgb
Copy link
Contributor Author

erikgb commented Nov 21, 2024

Great work, this is something that could be useful in our other APIs too.

Yeah, I am going on a "round around the block". But I need static CRDs in Git first. 😉

@inteon inteon changed the title Improve API specification Improve OpenAPI validation and SSA Golang markers Nov 21, 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. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants