-
Notifications
You must be signed in to change notification settings - Fork 112
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
create Pod Disruption Budget for DCA and CCR deployments #1454
Conversation
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 pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, refactoring, documentation, tooling, dependencies
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1454 +/- ##
==========================================
+ Coverage 48.70% 48.79% +0.09%
==========================================
Files 224 225 +1
Lines 19845 20025 +180
==========================================
+ Hits 9666 9772 +106
- Misses 9670 9742 +72
- Partials 509 511 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
e2f8f72
to
b828c21
Compare
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.
Left some minor comments/questions. Would be nice if you could add a test here.
Otherwise looks good to me!
internal/controller/datadogagent/component/clusterchecksrunner/default.go
Outdated
Show resolved
Hide resolved
internal/controller/datadogagent/component/clusteragent/utils.go
Outdated
Show resolved
Hide resolved
// Set CreatePodDisruptionBudget to true to create a PodDisruptionBudget for this component. | ||
// Not applicable for the Node Agent. A Cluster Agent PDB is set with 1 min available pod, and a Cluster Checks Runner PDB is set with 1 max unavailable pod. | ||
// +optional | ||
CreatePodDisruptionBudget *bool `json:"createPodDisruptionBudget,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.
I wonder if we ever get a request for making PDB configurable?! I guess it's unlikely since we haven't made it configurable in helm.
What does this PR do?
Create Pod Disruption budgets for cluster agent and cluster checks runners.
Motivation
#864 We had PDB in version 0.8.x but it was not included in later versions of the operator.
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
datadog-agent.yaml
:kubectl get poddisruptionbudgets
and you should see the DCA and CLC PDBs created. CLC has a maxUnavailable of 1 pod, and DCA has a minAvailable of 1 pod.kubectl get pods -o wide
to see which node the DCA and CLC pods are on.k drain <node> --ignore-daemonsets --delete-emptydir-data
. You should get a message like this:Cannot evict pod as it would violate the pod's disruption budget.
kubectl get pods -o wide
to see the status of the nodes now. There should only be one running pod for DCA, and only one pending pod for CLC.kubectl uncordone <node>
kubectl get pods -o wide
-- everything should be back to running.Checklist
bug
,enhancement
,refactoring
,documentation
,tooling
, and/ordependencies
qa/skip-qa
label