Skip to content

Empty objectives are fine for DPA manifest - #3400

Open
ADKosm wants to merge 1 commit into
mainfrom
alexey.kosmachev/CASCL-1715-remove-objectives-min-items
Open

Empty objectives are fine for DPA manifest#3400
ADKosm wants to merge 1 commit into
mainfrom
alexey.kosmachev/CASCL-1715-remove-objectives-min-items

Conversation

@ADKosm

@ADKosm ADKosm commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Remove MinItems=1 validation 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.

@ADKosm ADKosm self-assigned this Aug 25, 2026
@ADKosm
ADKosm requested a review from a team August 25, 2026 12:53
@ADKosm
ADKosm requested a review from a team as a code owner August 25, 2026 12:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines 118 to 119
// +listType=atomic
// +kubebuilder:validation:MinItems=1
Objectives []common.DatadogPodAutoscalerObjective `json:"objectives,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Aug 25, 2026

Copy link
Copy Markdown

Pipelines  Code Coverage

Unblock PR with BitsAI

⚠️ Warnings

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 3 Pipeline jobs failed

DataDog/datadog-operator | generate_code — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

pull request linter | Check Milestone

View more details · View in GitHub Actions

Missing milestone or 'qa/skip-qa' label.

pull request linter | build

View more details · View in GitHub Actions

Missing required labels in pull request.

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 50.18% (+0.00%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 710e2c5 | Docs | View more details | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant