Replace Mode field of DPA with addition to Strategy field#2787
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2787 +/- ##
==========================================
+ Coverage 38.80% 38.90% +0.10%
==========================================
Files 309 309
Lines 26847 26925 +78
==========================================
+ Hits 10417 10475 +58
- Misses 15650 15669 +19
- Partials 780 781 +1
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7aaa1a622
ℹ️ 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".
| // Strategy defines the mode of the update policy. | ||
| Strategy DatadogPodAutoscalerUpdateStrategy `json:"strategy,omitempty"` |
There was a problem hiding this comment.
Preserve
update.mode during the storage-version transition
Removing Mode from the shared DatadogPodAutoscalerUpdatePolicy breaks upgrade compatibility for existing DPAs that rely on update.mode: TriggerRollout. v1alpha2 is still the storage version (config/crd/bases/v1/datadoghq.com_datadogpodautoscalers.yaml:1874-1875), and there is no conversion or migration path here, so previously stored objects will now deserialize without that field. In the common case where users left strategy unset and only set mode: TriggerRollout, the upgraded object comes back as the default strategy instead of rollout mode, silently changing vertical update behavior after the operator/CRD upgrade.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
No one should be using this field so it should be safe to remove
| enum: | ||
| - Auto | ||
| - Disabled | ||
| - TriggerRollout |
There was a problem hiding this comment.
Regenerate the bundle CRD before exposing
TriggerRollout
This changes the source CRD enum, but the shipped OLM bundle still advertises update.strategy as only Auto|Disabled in bundle/manifests/datadoghq.com_datadogpodautoscalers.yaml:231-236 and :1018-1023. In bundle/OLM installs, strategy: TriggerRollout will therefore still be rejected or pruned even though the base CRD now documents it, so the new API shape is only partially released unless the bundle artifacts are regenerated in the same PR.
Useful? React with 👍 / 👎.
2655785
into
main
What does this PR do?
Removal of
Modefield in theDatadogPodAutoscalerCRD. It's functionality is replaced with an extension of theStrategyfield with a new enum valueDatadogPodAutoscalerTriggerRolloutUpdateStrategy.Motivation
Cleanup of
Modefield.Additional Notes
Anything else we should know when reviewing?
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
Write there any instructions and details you may have to test your PR.
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel