Add validations to DatadogMonitorSpec #1694
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is the next iteration of this PR. I realized that we don’t actually need fancy CEL validations for most basic validations. So I updated the PR to use the simple CRD validations.
Motivation
Currently, the Datadog Operator does not implement validating webhooks and validates inputs during reconciliation. I assume this is to simplify the operator setup, but from a user experience perspective, it’s not ideal since users can only discover issues after applying their manifests.
Additional Notes
Minimum Agent Versions
N/A
Describe your test plan
I've tested it locally using a Kind cluster with Kubernetes 1.32.
Checklist
bug
,enhancement
,refactoring
,documentation
,tooling
, and/ordependencies
qa/skip-qa
label