Empty objectives are fine for DPA manifest - #3400
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 710e2c58e4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // +listType=atomic | ||
| // +kubebuilder:validation:MinItems=1 | ||
| Objectives []common.DatadogPodAutoscalerObjective `json:"objectives,omitempty"` |
There was a problem hiding this comment.
Regenerate the CRD schemas for empty objectives
When either resource is installed from the checked-in CRDs, an explicit empty objectives array is still rejected: config/crd/bases/v1/datadoghq.com_datadogpodautoscalers.yaml line 1630 and datadoghq.com_datadogpodautoscalerclusterprofiles.yaml line 812 still specify minItems: 1. Removing only the source marker therefore does not enable the intended manifests; run the prescribed generation commands and commit the regenerated YAML/JSON schemas.
AGENTS.md reference: AGENTS.md:L16-L22
Useful? React with 👍 / 👎.
|
Remove
MinItems=1validation from the Objectives field on both DatadogPodAutoscaler and DatadogPodAutoscalerClusterProfile. This allows users to define a DPA with an empty objectives array, which is needed when all scaling configuration comes from the custom-recommender annotation settings or vertical-only autoscalers.