Skip to content

[clusteragent/admission/sidecar] Set ShareProcessNamespace=true on EKS Fargate#23963

Merged
dd-mergequeue[bot] merged 2 commits intomainfrom
davidor/contint-3942-admin-controller-eksfargate-share-process-namespace
Mar 21, 2024
Merged

[clusteragent/admission/sidecar] Set ShareProcessNamespace=true on EKS Fargate#23963
dd-mergequeue[bot] merged 2 commits intomainfrom
davidor/contint-3942-admin-controller-eksfargate-share-process-namespace

Conversation

@davidor
Copy link
Copy Markdown
Member

@davidor davidor commented Mar 21, 2024

What does this PR do?

Sets ShareProcessNamespace=true in the sidecar admission controller webhook when deploying on EKS Fargate.
This is needed by the process collection feature.

Describe how to test/QA your changes

Deploy the Agent on EKS Fargate. You need to enable the admission controller with sidecar injection configured to enable process collection via sidecar profiles. Here's the helm chart that I used:

clusterAgent:
  admissionController:
    enabled: true
  env:
    - name: DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_ENABLED
      value: "true"
    - name: DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_PROVIDER
      value: "fargate"
    - name: DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_PROFILES
      value: "[{\"env\":[{\"name\":\"DD_PROCESS_CONFIG_PROCESS_COLLECTION_ENABLED\", \"value\":\"true\"}]}]"

Now deploy something on the Fargate namespace. The only important part is to set the labels used by the admission controller correctly. Also, make sure that shareProcessNamespace is not set (it will be injected automatically). Here's an example deployment that you can use:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
        admission.datadoghq.com/enabled: "true"
        agent.datadoghq.com/sidecar: "fargate"
    spec:
      serviceAccountName: datadog-agent-fargate # Make sure this matches your service account
      containers:
      - name: nginx
        image: nginx

Remember to create the needed RBACs for Fargate as described here: https://docs.datadoghq.com/integrations/eks_fargate/#aws-eks-fargate-rbac

Now check that process collection works as expected. In the Datadog app you should be able to see the processes both for the agent sidecar that was automatically injected and also for your container.

@davidor davidor added this to the 7.53.0 milestone Mar 21, 2024
@davidor davidor requested review from a team as code owners March 21, 2024 13:44
@davidor davidor force-pushed the davidor/contint-3942-admin-controller-eksfargate-share-process-namespace branch from 983d1c4 to 7dca845 Compare March 21, 2024 14:00
@agent-platform-auto-pr
Copy link
Copy Markdown
Contributor

agent-platform-auto-pr Bot commented Mar 21, 2024

[Fast Unit Tests Report]

On pipeline 30550182 (CI Visibility). The following jobs did not run any unit tests:

Jobs:
  • tests_flavor_dogstatsd_deb-x64
  • tests_flavor_heroku_deb-x64
  • tests_flavor_iot_deb-x64

If you modified Go files and expected unit tests to run in these jobs, please double check the job logs. If you think tests should have been executed reach out to #agent-developer-experience

Copy link
Copy Markdown
Contributor

@maycmlee maycmlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small suggestion, but approving.

@davidor davidor force-pushed the davidor/contint-3942-admin-controller-eksfargate-share-process-namespace branch from 338fbff to 6afa3e2 Compare March 21, 2024 14:41
@davidor
Copy link
Copy Markdown
Member Author

davidor commented Mar 21, 2024

/merge

@dd-devflow
Copy link
Copy Markdown

dd-devflow Bot commented Mar 21, 2024

🚂 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!

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 21, 2024

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv create-vm --pipeline-id=30550182 --os-family=ubuntu

@dd-devflow
Copy link
Copy Markdown

dd-devflow Bot commented Mar 21, 2024

🚂 MergeQueue

Added to the queue.

There are 4 builds ahead of this PR! (estimated merge in less than 28m)

Use /merge -c to cancel this operation!

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 21, 2024

Regression Detector

Regression Detector Results

Run ID: 77a6195c-cb38-43f6-bee5-f2a61aa9ca84
Baseline: 02e1134
Comparison: 6afa3e2

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

No significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization -0.96 [-7.31, +5.39]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
tcp_syslog_to_blackhole ingress throughput +0.88 [+0.78, +0.97]
uds_dogstatsd_to_api_cpu % cpu utilization +0.79 [-1.96, +3.54]
pycheck_1000_100byte_tags % cpu utilization +0.33 [-4.55, +5.21]
process_agent_real_time_mode memory utilization +0.11 [+0.08, +0.15]
otel_to_otel_logs ingress throughput +0.11 [-0.30, +0.52]
trace_agent_json ingress throughput +0.00 [-0.04, +0.05]
trace_agent_msgpack ingress throughput +0.00 [-0.01, +0.01]
uds_dogstatsd_to_api ingress throughput +0.00 [-0.20, +0.20]
idle memory utilization -0.00 [-0.05, +0.04]
tcp_dd_logs_filter_exclude ingress throughput -0.01 [-0.03, +0.01]
process_agent_standard_check memory utilization -0.16 [-0.21, -0.12]
file_tree memory utilization -0.17 [-0.27, -0.08]
process_agent_standard_check_with_stats memory utilization -0.32 [-0.37, -0.28]
file_to_blackhole % cpu utilization -0.96 [-7.31, +5.39]
basic_py_check % cpu utilization -1.91 [-4.35, +0.53]

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@dd-mergequeue dd-mergequeue Bot merged commit 7deabc0 into main Mar 21, 2024
@dd-mergequeue dd-mergequeue Bot deleted the davidor/contint-3942-admin-controller-eksfargate-share-process-namespace branch March 21, 2024 16:42
alexgallotta pushed a commit that referenced this pull request May 9, 2024
…S Fargate (#23963)

* [clusteragent/admission/sidecar] Set ShareProcessNamespace=true on EKS Fargate

* Add release note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants