feat(origin detection): add OriginDetectionUnified setting
What does this PR do?
Add a new Global setting for the Origin Detection Unified setting of the Agent. This setting is a global one as it control Origin Detection behaviour for multiple Operator features (APM and DogStatsD).
Motivation
This is needed to support newest Agent features in the Operator.
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
- Agent: v7.54.0
Describe your test plan
With the following manifest:
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
name: datadog
spec:
override:
nodeAgent:
image:
tag: 7.54.0-rc.1-jmx
pullPolicy: Always
containers:
agent:
env:
- name: "DD_TELEMETRY_ENABLED"
value: "true"
clusterAgent:
image:
tag: 7.54.0-rc.1
pullPolicy: Always
clusterChecksRunner:
image:
tag: 7.54.0-rc.1-jmx
pullPolicy: Always
global:
clusterName: "wassim-minikube"
originDetectionUnified:
enabled: true
kubelet:
tlsVerify: false
credentials:
apiSecret:
secretName: datadog-secret
keyName: api-key
appSecret:
secretName: datadog-secret
keyName: app-key
features:
orchestratorExplorer:
enabled: true
liveProcessCollection:
enabled: true
admissionController:
enabled: true
externalMetricsServer:
enabled: true
You should see the following:
➜ originDetectionUnified k exec -it datadog-agent-8xc84 -- agent config | grep origin_detection_unified
Defaulted container "agent" out of: agent, trace-agent, process-agent, init-volume (init), init-config (init)
origin_detection_unified: true
With the following manifest:
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
name: datadog
spec:
override:
nodeAgent:
image:
tag: 7.54.0-rc.1-jmx
pullPolicy: Always
containers:
agent:
env:
- name: "DD_TELEMETRY_ENABLED"
value: "true"
clusterAgent:
image:
tag: 7.54.0-rc.1
pullPolicy: Always
clusterChecksRunner:
image:
tag: 7.54.0-rc.1-jmx
pullPolicy: Always
global:
clusterName: "wassim-minikube"
kubelet:
tlsVerify: false
credentials:
apiSecret:
secretName: datadog-secret
keyName: api-key
appSecret:
secretName: datadog-secret
keyName: app-key
features:
orchestratorExplorer:
enabled: true
liveProcessCollection:
enabled: true
admissionController:
enabled: true
externalMetricsServer:
enabled: true
You should see the following:
➜ originDetectionUnified k exec -it datadog-agent-bv5rv -- agent config | grep origin_detection_unified
Defaulted container "agent" out of: agent, trace-agent, process-agent, init-volume (init), init-config (init)
origin_detection_unified: false
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
Attention: Patch coverage is 0% with 6 lines in your changes are missing coverage. Please review.
Project coverage is 59.53%. Comparing base (
6b0c7bd) to head (29ae098). Report is 2 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1179 +/- ##
==========================================
- Coverage 59.55% 59.53% -0.02%
==========================================
Files 174 174
Lines 21559 21565 +6
==========================================
Hits 12839 12839
- Misses 7941 7946 +5
- Partials 779 780 +1
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 59.53% <0.00%> (-0.02%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files | Coverage Δ | |
|---|---|---|
| apis/datadoghq/v2alpha1/datadogagent_types.go | 100.00% <ø> (ø) |
|
| controllers/datadogagent/override/global.go | 40.35% <0.00%> (-1.10%) |
:arrow_down: |
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 6b0c7bd...29ae098. Read the comment docs.
/merge
:steam_locomotive: MergeQueue
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.
Use /merge -c to cancel this operation!
:warning: MergeQueue
This merge request was unqueued
If you need support, contact us on Slack #devflow!