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

Implement Validation Webhook for Tratteria Custom Resources #46

Open
kchiranjewee63 opened this issue Aug 7, 2024 · 0 comments
Open

Comments

@kchiranjewee63
Copy link
Member

kchiranjewee63 commented Aug 7, 2024

Current Behavior

Currently, there is no validation webhook for Tratteria Configuration Resources. Incorrect configurations are only detected at runtime.

Desired Behavior

Implement a validation webhook that performs thorough checks on Tratteria CRDs, particularly TraTs, before they are persisted in the cluster. This will catch configuration errors early in the deployment process.

Proposed Validations (non-exhaustive)

For TraTs and other Tratteria CRDs, implement validations including but not limited to:

  1. Variable referencing:
    • Validate correct referencing of user-introduced variables.
    • Verify proper usage of standard variables (e.g., body, headers).
  2. adzMapping validation:
    • Implement stricter validation for the adzMapping field, which currently accepts any input in the CRD definition.
  3. HTTP method names:
    • Ensure that only valid HTTP method names (GET, POST, PUT, DELETE, etc.) are used.

Discussion Points

  • Are there any other important validations we should include?
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

No branches or pull requests

1 participant