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 validations on DNSRecord spec fields #110

Closed
mikenairn opened this issue May 8, 2024 · 2 comments · Fixed by #160 or Kuadrant/kuadrant-operator#723
Closed

Improve validations on DNSRecord spec fields #110

mikenairn opened this issue May 8, 2024 · 2 comments · Fixed by #160 or Kuadrant/kuadrant-operator#723
Assignees
Labels
enhancement New feature or request size/small

Comments

@mikenairn
Copy link
Member

mikenairn commented May 8, 2024

What

Improve the validations we currently have for fields on the DNSRecord spec.

Review the DNSRecord spec and check that each field exposed via the public API has appropriate validations added.
We may want to add a limit to the number of endpoints that can be added to the spec, we need to look into CEL docs to see what sort of upper limits are permitted.

Investigate more advanced CEL validations, can this whole validate method be replaced with CEL validations?

@philbrookes philbrookes added enhancement New feature or request size/small labels May 9, 2024
@maksymvavilov maksymvavilov self-assigned this May 31, 2024
maksymvavilov added a commit that referenced this issue Jun 6, 2024
maksymvavilov added a commit that referenced this issue Jun 7, 2024
maksymvavilov added a commit that referenced this issue Jun 7, 2024
maksymvavilov added a commit that referenced this issue Jun 7, 2024
maksymvavilov added a commit that referenced this issue Jun 7, 2024
@maksymvavilov
Copy link
Contributor

Closing this issue. We can't conveniently use CEL validations unless we reimplement the Endpoint struct from external-dns. Reimplementing will allow us to reduce complexity of the CEL validation, otherwise openAPIV3Schema validation fails. Refer to the #158 for more details.

@maksymvavilov maksymvavilov linked a pull request Jun 7, 2024 that will close this issue
@mikenairn
Copy link
Member Author

mikenairn commented Jun 7, 2024

Closing this issue. We can't conveniently use CEL validations unless we reimplement the Endpoint struct from external-dns. Reimplementing will allow us to reduce complexity of the CEL validation, otherwise openAPIV3Schema validation fails. Refer to the #158 for more details.

Using CEL to replace the validate function was only part of what we wanted to get out of this issue, and was really a question to answer as part of looking into the validation rather than being the only thing to try and do.

The main thing was to "Improve the validations we currently have for fields on the DNSRecord spec". There is still a lot of the fields in the spec that have no validations where there probably should be something. HealthCheck spec in particular is quite lacking https://github.com/Kuadrant/dns-operator/blob/main/api/v1alpha1/dnsrecord_types.go#L27-L53

@mikenairn mikenairn reopened this Jun 7, 2024
@maksymvavilov maksymvavilov linked a pull request Jun 26, 2024 that will close this issue
@maksymvavilov maksymvavilov removed a link to a pull request Jun 26, 2024
@maksymvavilov maksymvavilov reopened this Jun 28, 2024
philbrookes pushed a commit to philbrookes/dns-operator that referenced this issue Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/small
Projects
Status: Done
3 participants