Skip to content

feat(DPA): Add options.burstable + CPURequestsRemoveLimitsMemoryRequestsAndLimits controlled values#2902

Merged
clamoriniere merged 3 commits intomainfrom
clamoriniere/dpa-resource-settings
May 5, 2026
Merged

feat(DPA): Add options.burstable + CPURequestsRemoveLimitsMemoryRequestsAndLimits controlled values#2902
clamoriniere merged 3 commits intomainfrom
clamoriniere/dpa-resource-settings

Conversation

@clamoriniere
Copy link
Copy Markdown
Collaborator

@clamoriniere clamoriniere commented Apr 14, 2026

Summary

  • Adds a new CPURequestsRemoveLimitsMemoryRequestsAndLimits enum value to DatadogPodAutoscalerContainerControlledValues
  • This mixed-mode value applies different strategies per resource type:
    • CPU: only requests are controlled and any existing CPU limit is removed, allowing the container to burst freely and avoid CPU throttling
    • Memory: both requests and limits are controlled
  • Adds doc comments to all three enum values to clarify their respective behaviours
  • Adds a new burstable option to DatadogPodAutoscalerOptions (spec) and DatadogPodAutoscalerOptionsStatus (status); when set, removes CPU limits from containers granting Burstable QoS. The Cluster Agent default is controlled by the setting autoscaling.workload.options.burstable
  • Regenerates CRD manifests via make generate

Test plan

  • Verify the new enum value is accepted by the CRD validation
  • Verify CPU limits are removed when this mode is active
  • Verify memory requests and limits are both updated when this mode is active
  • Verify burstable: true in spec removes CPU limits and sets Burstable QoS
  • Verify burstable unset in spec falls back to the Cluster Agent setting autoscaling.workload.options.burstable

🤖 Assisted-by: Claude:claude-sonnet-4-6 sparse smatch

@clamoriniere clamoriniere added this to the v1.27.0 milestone Apr 14, 2026
@clamoriniere clamoriniere added the enhancement New feature or request label Apr 14, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.39%. Comparing base (d1d2b65) to head (0a338e7).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2902   +/-   ##
=======================================
  Coverage   41.39%   41.39%           
=======================================
  Files         331      331           
  Lines       28911    28911           
=======================================
  Hits        11969    11969           
  Misses      16086    16086           
  Partials      856      856           
Flag Coverage Δ
unittests 41.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1d2b65...0a338e7. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@datadog-prod-us1-3
Copy link
Copy Markdown

datadog-prod-us1-3 Bot commented Apr 14, 2026

Code Coverage

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

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0a338e7 | Docs | Datadog PR Page | Give us feedback!

@clamoriniere clamoriniere marked this pull request as ready for review April 14, 2026 12:11
@clamoriniere clamoriniere requested a review from a team April 14, 2026 12:11
@clamoriniere clamoriniere requested a review from a team as a code owner April 14, 2026 12:11
Copy link
Copy Markdown

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

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: c59fc90bbc

ℹ️ 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".

enum:
- RequestsAndLimits
- RequestsOnly
- CPURequestsRemoveLimitsMemoryRequestsAndLimits
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Regenerate packaged CRDs for new controlledValues enum

This adds CPURequestsRemoveLimitsMemoryRequestsAndLimits to the source CRD schema, but the distributed CRD artifacts still shipped from this repo (bundle/manifests/datadoghq.com_datadogpodautoscalers.yaml and marketplaces/charts/google-marketplace/chart/datadog-mp/templates/manifests.yaml) still only allow RequestsAndLimits and RequestsOnly. In installs that use those packaged manifests (OLM bundle / marketplace), the new mode will be rejected by CRD validation, so the feature is only partially delivered.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

no need, the bundle files will be updated during the operator release process

…calerContainerControlledValues

Introduce a new mixed-mode enum value that applies different strategies
per resource type: CPU requests are controlled while any existing CPU
limit is removed (to avoid throttling), and memory controls both
requests and limits.

Also add doc comments to all three enum values to clarify their
respective behaviours.

Assisted-by: Claude:claude-sonnet-4-6
@clamoriniere clamoriniere force-pushed the clamoriniere/dpa-resource-settings branch from c59fc90 to d632536 Compare May 3, 2026 18:51
Adds spec.options.burstable to DPA and DPACP template, allowing users
to explicitly enable burstable mode (removes CPU limits, grants Burstable
QoS class). When unset, the effective value is determined by the Cluster
Agent setting autoscaling.workload.behavior.burstable and reflected back
in status.options.burstable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@clamoriniere clamoriniere force-pushed the clamoriniere/dpa-resource-settings branch from d632536 to adf7661 Compare May 3, 2026 19:36
@clamoriniere clamoriniere changed the title Add CPURequestsRemoveLimitsMemoryRequestsAndLimits controlled values for DPA feat(DPA): Add options.burstable + CPURequestsRemoveLimitsMemoryRequestsAndLimits controlled values May 4, 2026
Comment thread api/datadoghq/common/datadogpodautoscaler_types.go
// granting the pod a Burstable QoS class and allowing it to consume idle node CPU capacity beyond its requests.
// If not set, the default value is determined by the Cluster Agent setting autoscaling.workload.options.burstable.
// +optional
Burstable *bool `json:"burstable,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As I already shared, I don't think this option should be exposed, I believe both the naming and the duplication is causing an issue.

// When not set in the spec, this reflects the default determined by the Cluster Agent
// setting autoscaling.workload.options.burstable.
// +optional
Burstable *bool `json:"burstable,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Given that it can be set per-container, I don't believe the option makes sense at all.

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.

5 participants