Skip to content

[autoscaling] add spot scheduling#2621

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
alexander.yastrebov/spot-scheduling
May 6, 2026
Merged

[autoscaling] add spot scheduling#2621
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
alexander.yastrebov/spot-scheduling

Conversation

@AlexanderYastrebov

@AlexanderYastrebov AlexanderYastrebov commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds datadog.autoscaling.cluster.spot.enabled to enable RBAC permissions
for the spot instance scheduler in the Cluster Agent:

  • Deployments and StatefulSets (get, list, watch, patch) — to write the
    spot-disabled-until annotation during on-demand fallback.
  • pods/eviction (create) — to evict pending spot pods and trigger
    on-demand fallback rescheduling.

Motivation

The spot scheduler MVP was added in DataDog/datadog-agent#47429
The equivalent operator change is DataDog/datadog-operator#2957

Minimum Agent Versions

  • Cluster Agent: v7.79.0

Updates https://datadoghq.atlassian.net/browse/CASCL-1315

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • All commits are signed and show as "Verified" on GitHub (see: signing commits)
  • Chart Version semver bump label has been added (use <chartName>/minor-version, <chartName>/patch-version, or <chartName>/no-version-bump)
  • For datadog or datadog-operator chart or value changes, update the test baselines (run: make update-test-baselines)
  • For datadog chart changes, received ✅ from a member of your team

GitHub CI takes care of the below, but are still required:

  • Documentation has been updated with helm-docs (run: .github/helm-docs.sh)
  • CHANGELOG.md has been updated
  • Variables are documented in the README.md

@AlexanderYastrebov
AlexanderYastrebov changed the base branch from main to triviajon/ipvpa April 29, 2026 11:23
@AlexanderYastrebov
AlexanderYastrebov force-pushed the alexander.yastrebov/spot-scheduling branch from 91a4baf to 9d79d81 Compare April 29, 2026 11:26
@AlexanderYastrebov AlexanderYastrebov changed the title Alexander.yastrebov/spot scheduling [autoscaling] add spot scheduling Apr 29, 2026
@AlexanderYastrebov
AlexanderYastrebov force-pushed the alexander.yastrebov/spot-scheduling branch 3 times, most recently from abf2c19 to 278c2de Compare April 29, 2026 12:04
@AlexanderYastrebov
AlexanderYastrebov force-pushed the alexander.yastrebov/spot-scheduling branch 2 times, most recently from 1b2feaf to f9b5f9a Compare April 29, 2026 13:42
Base automatically changed from triviajon/ipvpa to main April 29, 2026 17:55
Comment thread charts/datadog/README.md
| datadog.asm.sca.enabled | bool | `false` | Enable Application Security Management Software Composition Analysis by injecting `DD_APPSEC_SCA_ENABLED=true` environment variable to all pods in the cluster |
| datadog.asm.threats.enabled | bool | `false` | Enable Application Security Management Threats App & API Protection by injecting `DD_APPSEC_ENABLED=true` environment variable to all pods in the cluster |
| datadog.autoscaling.workload.enabled | string | `nil` | Enable Workload Autoscaling. |
| datadog.autoscaling.workload.enabled | bool | `nil` | Enable Workload Autoscaling. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if a new option (datadog.autoscaling.cluster.spot.enabled) is added it should be visible in this file

@AlexanderYastrebov AlexanderYastrebov May 5, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The change is just a type hint for datadog.autoscaling.workload.enabled.
Its not GA so we do not show it here (similar to absent datadog.autoscaling.cluster.enabled).

Comment thread charts/datadog/templates/cluster-agent-rbac.yaml
Comment thread charts/datadog/CHANGELOG.md Outdated
@AlexanderYastrebov
AlexanderYastrebov force-pushed the alexander.yastrebov/spot-scheduling branch from f9b5f9a to 5ebe742 Compare May 5, 2026 10:34
@github-actions github-actions Bot added the chart/datadog This issue or pull request is related to the datadog chart label May 5, 2026
@AlexanderYastrebov
AlexanderYastrebov force-pushed the alexander.yastrebov/spot-scheduling branch 2 times, most recently from 9ab4b10 to 5d72a30 Compare May 5, 2026 14:58
@AlexanderYastrebov AlexanderYastrebov added the datadog/minor-version Minor version bump for datadog chart label May 5, 2026
@AlexanderYastrebov
AlexanderYastrebov marked this pull request as ready for review May 5, 2026 15:04
@AlexanderYastrebov
AlexanderYastrebov requested review from a team as code owners May 5, 2026 15:04
@AlexanderYastrebov
AlexanderYastrebov requested review from tedkahwaji and removed request for a team May 5, 2026 15:04
@tedkahwaji
tedkahwaji requested a review from swang392 May 6, 2026 14:04
- watch
- patch
{{- end}}
{{- if or (((.Values.datadog.autoscaling).workload).enabled) ((((.Values.datadog.autoscaling).cluster).spot).enabled) }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good but the re-ordering make the review difficult 😅

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, but I actually made it to match datadog-operator configuration almost exactly so maybe in the future we can unify/reuse RBAC definition between operator and Helm.

What does this PR do?
---------------------
Adds `datadog.autoscaling.cluster.spot.enabled` to enable RBAC permissions
for the spot instance scheduler in the Cluster Agent:
- Deployments and StatefulSets (get, list, watch, patch) — to write the
  spot-disabled-until annotation during on-demand fallback.
- pods/eviction (create) — to evict pending spot pods and trigger
  on-demand fallback rescheduling.

Motivation
----------
The spot scheduler MVP was added in DataDog/datadog-agent#47429 (7.79.0).
The equivalent operator change is in DataDog/datadog-operator#2957.

Minimum Agent Versions
----------------------
* Cluster Agent: v7.79.0

Updates https://datadoghq.atlassian.net/browse/CASCL-1315

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@AlexanderYastrebov
AlexanderYastrebov force-pushed the alexander.yastrebov/spot-scheduling branch from 5d72a30 to 97ecbfc Compare May 6, 2026 15:49
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 07def5b into main May 6, 2026
41 of 42 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the alexander.yastrebov/spot-scheduling branch May 6, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart/datadog This issue or pull request is related to the datadog chart datadog/minor-version Minor version bump for datadog chart mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants