Skip to content

Add CPURequestsRemoveLimitsMemoryRequestsAndLimits controlled values for DPA#2902

Open
clamoriniere wants to merge 1 commit intomainfrom
clamoriniere/dpa-resource-settings
Open

Add CPURequestsRemoveLimitsMemoryRequestsAndLimits controlled values for DPA#2902
clamoriniere wants to merge 1 commit 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
  • 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

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

…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 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 40.05%. Comparing base (d09fcb3) to head (c59fc90).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2902   +/-   ##
=======================================
  Coverage   40.05%   40.05%           
=======================================
  Files         319      319           
  Lines       28052    28052           
=======================================
  Hits        11237    11237           
  Misses      15993    15993           
  Partials      822      822           
Flag Coverage Δ
unittests 40.05% <ø> (ø)

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 d09fcb3...c59fc90. 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

This comment has been minimized.

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

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants