-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new version of DatadogPodAutoscaler CRD #1621
base: main
Are you sure you want to change the base?
Conversation
3c1e64d
to
2f562af
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1621 +/- ##
=======================================
Coverage 49.28% 49.28%
=======================================
Files 216 216
Lines 20662 20662
=======================================
Hits 10184 10184
Misses 9942 9942
Partials 536 536
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
|
8d7bcb7
to
32b049f
Compare
`operator-sdk create api --group datadoghq --kind DatadogPodAutoscaler --version v2alpha1`
Similar to v1alpah1, with the following changes: - `spec.policy` renamed to `spec.actuation` - `spec.policy.applyMode` replaced with `spec.actuation.mode` (allowed values `Apply` and `Preview`) - `spec.policy.upscale.match` and `spec.policy.donwscale.match` removed - `spec.policy.targets` renamed to `spec.policy.objectives` - `sepc.policy.contraints.containers[].limits` removed
32b049f
to
fb5a478
Compare
domain: com | ||
group: datadoghq | ||
kind: DatadogPodAutoscaler | ||
path: github.com/DataDog/datadog-operator/api/datadoghq/v2alpha1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we'll expose a v2 for GA, so that version will probably v1beta1 or v1alpha2
// It's also possible to selectively deactivate upscale, downscale or update actions thanks to the `Upscale`, `Downscale` and `Update` fields. | ||
// +optional | ||
// +kubebuilder:default=All | ||
Mode DatadogPodAutoscalerActuationMode `json:"applyMode"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mode DatadogPodAutoscalerActuationMode `json:"applyMode"` | |
Mode DatadogPodAutoscalerActuationMode `json:"mode"` |
Update *DatadogPodAutoscalerUpdatePolicy `json:"update,omitempty"` | ||
|
||
// Upscale defines the policy to scale up the target resource. | ||
Upscale *DatadogPodAutoscalerScalingPolicy `json:"upscale,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't there a proposal to change to scaleUp and scaleDown?
type DatadogPodAutoscalerActuation struct { | ||
// Mode determines recommendations that should be applied by the controller: | ||
// - All: Apply all recommendations (regular and manual). | ||
// - Manual: Apply only manual recommendations (recommendations manually validated by user in the Datadog app). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
Type DatadogPodAutoscalerTargetValueType `json:"type"` | ||
|
||
// Absolute defines the absolute value of the target (for instance 500 millicores). | ||
Absolute *resource.Quantity `json:"absolute,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: we need to keep Absolute for future cases but we need to disallow it for multi-dim and vertical scaling.
kind: Kustomization# For each CRD, "Editor" and "Viewer" roles are scaffolded by | ||
# default, aiding admins in cluster management. Those roles are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed as we don't ship the CRD in the operator
@@ -0,0 +1,9 @@ | |||
apiVersion: datadoghq.com/v2alpha1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can also be removed as we don't ship the CRD with the operator
// Actuation defines how recommendations should be applied. | ||
// +optional | ||
// +kubebuilder:default={} | ||
Actuation *DatadogPodAutoscalerActuation `json:"actuation,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not a big fan of presenting the actuation
name to customers but LGTM if we don't find anything else.
What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
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/ordependencies
qa/skip-qa
label