datadog-operator
datadog-operator copied to clipboard
[CECO-1238] Configure checks tag cardinality within `spec.global.checksTagCardinality`
What does this PR do?
- Similar to https://github.com/DataDog/datadog-operator/commit/3efc80aca617e12442ba4f6972fbfa5fdf7791a1, provides a way to directly configure the checks tag cardinality from the Agent CR without having to define an env var override
- As this is not a specific feature, it's configured within
global
Motivation
- https://datadoghq.atlassian.net/browse/CECO-1238
- Ease of configuration & Helm parity
Minimum Agent Versions
~~Are there minimum versions of the Datadog Agent and/or Cluster Agent required?~~
Describe your test plan
make IMG=<replace me> deployto deploy the image and CRDs insystemnamespace- Test the following scenarios and ensure the results are adequate:
-
apiVersion: datadoghq.com/v2alpha1 kind: DatadogAgent metadata: name: datadog spec: global: checksTagCardinality: orchestratorScenario : tag cardinality set to orchestrator
- [ ] Ensure the Agent env var
DD_CHECKS_TAG_CARDINALITYis set toorchestrator:
kubectl describe pod <NODE AGENT POD> | grep "DD_CHECKS_TAG_CARDINALITY"- [ ] Ensure the Agent cardinality is set to
orchestrator:
k exec -it <NODE AGENT NAME> -- agent config | grep checks_tag_cardinality - [ ] Ensure the Agent env var
-
apiVersion: datadoghq.com/v2alpha1 kind: DatadogAgent metadata: name: datadog spec: global: checksTagCardinality: illegal_valueScenario : tag cardinality set to illegal_value
- [ ] Ensure the Agent env var
DD_CHECKS_TAG_CARDINALITYis set toillegal_value:
kubectl describe pod <NODE AGENT POD> | grep "DD_CHECKS_TAG_CARDINALITY"- [ ] Ensure the Agent cardinality defaults to
lowby asserting the presence of the log mentioning the value is illegal :
k logs <NODE AGENT POD> | grep "check tag cardinality" - [ ] Ensure the Agent env var
-
Remove
global.checksTagCardinalityfrom your Agent CR Scenario : no checks tag cardinality- [ ] Assert the absence of
DD_CHECKS_TAG_CARDINALITYenv var on the node Agent
- [ ] Assert the absence of
-
Checklist
- [x] PR has at least one valid label:
bug,enhancement,refactoring,documentation,tooling, and/ordependencies - [x] PR has a milestone or the
qa/skip-qalabel
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 48.88%. Comparing base (583f3ec) to head (61a6a27).
:warning: Report is 345 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1309 +/- ##
==========================================
+ Coverage 48.85% 48.88% +0.03%
==========================================
Files 226 226
Lines 20132 20144 +12
==========================================
+ Hits 9835 9847 +12
Misses 9782 9782
Partials 515 515
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 48.88% <100.00%> (+0.03%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| api/datadoghq/v2alpha1/datadogagent_types.go | 100.00% <ø> (ø) |
|
| api/datadoghq/v2alpha1/test/builder.go | 92.04% <100.00%> (+0.04%) |
:arrow_up: |
| ...nternal/controller/datadogagent/override/global.go | 47.81% <100.00%> (+1.40%) |
:arrow_up: |
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 583f3ec...61a6a27. Read the comment docs.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
/merge
Devflow running: /merge
View all feedbacks in Devflow UI.
2024-11-18 16:44:31 UTC :information_source: MergeQueue: waiting for PR to be ready
This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.
2024-11-18 16:47:54 UTC :warning: MergeQueue: This merge request was unqueued
This merge request was unqueued
/remove
Devflow running: /remove
View all feedbacks in Devflow UI.
2024-11-18 16:47:51 UTC :information_source: Devflow: /remove
/merge
Devflow running: /merge
View all feedbacks in Devflow UI.
2024-11-19 09:23:51 UTC :information_source: MergeQueue: pull request added to the queue
The median merge time in main is 15m.