Skip to content
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

feat(ssi): add target based workload selection #1745

Merged
merged 3 commits into from
Mar 7, 2025

Conversation

betterengineering
Copy link
Member

@betterengineering betterengineering commented Mar 6, 2025

What this PR does / why we need it:

This change implements Kubernetes SSI | Workload Selection 🎯 which is being released as part of the Datadog Agent in 7.64.0.

Targets can be found here in the cluster agent. The goal is to allow a single operator to be able to configure instrumentation without needing to update any apps or deployments already running there.

Which issue this PR fixes

Special notes for your reviewer:

This change splits out the feature work from #1733 to merge them separately. Also, we will follow up with a future commit to update the examples for instrumentation once the agent has been released.

Tests

I have tested this change using injector-dev using the following scenario:

helm:
  localChartPath: "/Users/mark.spicer/go/src/github.com/DataDog/helm-charts/charts/datadog"
  apps:
  - name: python-injection
    namespace: application
    values:
      service:
        port: 8080
      image:
        repository: registry.ddbuild.io/ci/injector-dev/python
        tag: 2cd78ded
      podLabels:
        tags.datadoghq.com/env: local
        app: "billing-service"
      env:
      - name: DD_TRACE_DEBUG
        value: "true"
      - name: DD_APM_INSTRUMENTATION_DEBUG
        value: "true"
  - name: python-no-injection
    namespace: application
    values:
      service:
        port: 8080
      image:
        repository: registry.ddbuild.io/ci/injector-dev/python
        tag: 2cd78ded
      podLabels:
        tags.datadoghq.com/env: local
      env:
      - name: DD_TRACE_DEBUG
        value: "true"
      - name: DD_APM_INSTRUMENTATION_DEBUG
        value: "true"
  versions:
    agent: "7.64.0-rc.8"
    cluster_agent: "7.64.0-rc.8"
    injector: "0.31.1"
  config:
    datadog:
      apm:
        instrumentation:
          enabled: true
          targets:
            - name: "billing-service"
              podSelector:
                matchLabels:
                  app: "billing-service"
              namespaceSelector:
                matchNames:
                - "application"
              ddTraceVersions: 
                python: "default"
              ddTraceConfigs:
                - name: "DD_PROFILING_ENABLED"
                  value: "true"

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Chart Version bumped
  • Documentation has been updated with helm-docs (run: .github/helm-docs.sh)
  • CHANGELOG.md has been updated
  • Variables are documented in the README.md

@betterengineering betterengineering requested a review from a team as a code owner March 6, 2025 22:02
@betterengineering betterengineering requested review from a team and knusbaum March 6, 2025 22:03
@github-actions github-actions bot added the chart/datadog This issue or pull request is related to the datadog chart label Mar 6, 2025
Copy link
Collaborator

@clamoriniere clamoriniere left a comment

Choose a reason for hiding this comment

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

Hi @betterengineering

the change looks good,
Could you add or update the APM SSI CI helm configuration, so we can validate that the generated manifest is valid: https://github.com/DataDog/helm-charts/blob/main/charts/datadog/ci/apm-single-step-instrumentation-admission-controller-values.yaml

This commit adds support for targets that are available in Cluster Agent
7.64.0.
@betterengineering betterengineering force-pushed the mark.spicer/INPLAT-423-support-targets-v2 branch from b4bf26f to 4a705aa Compare March 7, 2025 14:01
Copy link
Collaborator

@clamoriniere clamoriniere left a comment

Choose a reason for hiding this comment

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

thanks for the quick update

@clamoriniere
Copy link
Collaborator

/merge

@dd-devflow
Copy link

dd-devflow bot commented Mar 7, 2025

View all feedbacks in Devflow UI.
2025-03-07 14:04:38 UTC ℹ️ Start processing command /merge


2025-03-07 14:04:44 UTC ℹ️ 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.


2025-03-07 14:43:11 UTC ℹ️ MergeQueue: merge request added to the queue

The median merge time in main is 38m.


2025-03-07 15:22:10 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit 7ee6d21 into main Mar 7, 2025
30 checks passed
@dd-mergequeue dd-mergequeue bot deleted the mark.spicer/INPLAT-423-support-targets-v2 branch March 7, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart/datadog This issue or pull request is related to the datadog chart mergequeue-status: done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants