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

IngressRoute CRD Validation #441

Merged
merged 3 commits into from
Jun 26, 2018

Conversation

stevesloka
Copy link
Member

This adds CRD Validation to the IngressRoute spec. One thing to note is it defines an Enum of values allowed for the strategy field which is not yet implemented. We may need to return to this validation once that feature lands.

// Fixes #416

Signed-off-by: Steve Sloka [email protected]

properties:
fqdn:
type: string
pattern: ^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are uppercase chars not allowed in FQDNs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup they are allowed, just was going with the default that they are typically lowercase. Will update to follow the spec.

type: string
pattern: ^\/.*$
delegate:
type: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be type: object?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes should be object

required:
- name
- namespace
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ # DNS-1123
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra/left-over pattern?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, similar to previous, will remove

@davecheney
Copy link
Contributor

@alexbrand @stevesloka you two know the most about defining validations. Please merge this when you are happy.

Thanks

Dave

@stevesloka
Copy link
Member Author

@alexbrand PR comments should all be resolved now

Signed-off-by: Steve Sloka <[email protected]>
@davecheney
Copy link
Contributor

@stevesloka can you please rerun deployment/render.sh

@davecheney davecheney merged commit 6f7f43e into projectcontour:master Jun 26, 2018
@stevesloka stevesloka deleted the crdValidation branch July 10, 2018 17:04
sunjayBhatia added a commit that referenced this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants