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

Add helm chart installation for OTel Agent #1429

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

dineshg13
Copy link
Member

@dineshg13 dineshg13 commented Jun 17, 2024

What this PR does / why we need it:

Adds OTel Agent container . OTel Agent is a Datadog's OpenTelemetry's collector distro that runs along with Agent.

The PR add example collector configuration and corresponding agent configuration.

To test the changes use the below helm command

helm install my ./charts/datadog --set-file datadog.otelCollector.config=examples/datadog/otel_collector_config.yaml -f examples/datadog/agent_otel_collector.yaml  --set datadog.apiKey=${DD_API_KEY}              

Special notes for your reviewer:

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
  • For Datadog Operator chart or value changes update the test baselines (run: make update-test-baselines)

@dineshg13 dineshg13 requested a review from a team as a code owner June 17, 2024 19:17
@github-actions github-actions bot added the chart/datadog This issue or pull request is related to the datadog chart label Jun 17, 2024
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.

a quick first review

charts/datadog/values.yaml Outdated Show resolved Hide resolved
Comment on lines 517 to 520
- containerPort: 4317
hostPort: 4317
- containerPort: 4318
hostPort: 4318
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think network policies need also to be updated. to expose the port.

and hostPort doesn't need to be set by default. see how it is done for the agent container

{{- if .http.useHostPort }}
hostPort: {{ .http.endpoint | regexFind ":[0-9]+$" | trimPrefix ":" }}
{{- end }}

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

charts/datadog/values.yaml Outdated Show resolved Hide resolved
@clamoriniere clamoriniere requested a review from a team July 10, 2024 10:18
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 @dineshg13

the changes present seems to be ok.
However some changes are missing:

Also I'm wondering if the work to be supported in GKE autopilot has been done already with the @DataDog/container-ecosystems team to define the new profil. If not maybe, the best for not is to disable OTEL container if GKE autopilot support is enable.

I let the container-ecosystem team responsible of the datadog chart the end of this PR review.

last, If you can add in the PR description more information about how to test it. For example the minimum values.yaml needed to install the chart with the OTEL container. 🙇

charts/datadog/Chart.yaml Outdated Show resolved Hide resolved
Comment on lines 590 to 592
{{- if .Values.providers.gke.autopilot -}}
datadog-agent-otel-config
{{- else -}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

@DataDog/container-ecosystems have you been able to update the Agent profile in GKE autopilot to support the additional OTEL container?

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 10, 2024
@dineshg13
Copy link
Member Author

@clamoriniere how do i update Celium/Network policy ? How can we handle the case where customer might use a different port for OTLP receiver ?

Comment on lines 2 to 34
agents:
image:
repository: datadog/agent-dev
tag: nightly-ot-main
doNotCheckTag: true
containers:
agent:
env:
- name: DD_OTELCOLLECTOR_ENABLED
value: "true"
- name: DD_HOSTNAME
value: "datadog"
datadog:
apiKey: "00000000000000000000000000000000"
appKey: "0000000000000000000000000000000000000000"
otelCollector:
enabled: true
config: |
receivers:
otlp:
exporters:
datadog:
api:
key: "00000000000000000000000000000000"
service:
pipelines:
traces:
receivers: [otlp]
exporters: [datadog]
metrics:
receivers: [otlp]
exporters: [datadog]
logs:
receivers: [otlp]
exporters: [datadog]
Copy link
Collaborator

@clamoriniere clamoriniere Jul 17, 2024

Choose a reason for hiding this comment

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

Can we make the default configuration shorter for otel support activation. like only to have to set datadog.otelcollector.enabled: true

When I saw the dash demo, it looks like only 2 parameters was needed.

I hope that we can simplify at least like

agents:
  image:
    tagSuffix: ot-beta
datadog:
  apiKey: "00000000000000000000000000000000"
  appKey: "0000000000000000000000000000000000000000"
  otelCollector:
    enabled: true

so my questions are, when datadog.otelcollector.enabled: true can we:

  • generate a default configuration that use the API provide in the datadog.apiKey field?
  • set agents.image.tagSuffix with ot-beta?
  • inject the needed envvars in the core-agent?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a good feedback. Thanks for same. I have addressed same in the latest commit .
if datadog.otelcollector.enabled: true we do the following

  1. set agents.image.tagSuffix with ot-beta if image tag isn't set
  2. inject the needed envvar DD_OTELCOLLECTOR_ENABLED in the core-agent .
  3. if datadog.otelcollector.config is not provided, use the default config.

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.

only 2 new comments

charts/datadog/templates/agent-services.yaml Outdated Show resolved Hide resolved
charts/datadog/values.yaml Outdated Show resolved Hide resolved
charts/datadog/templates/_container-otel-agent.yaml Outdated Show resolved Hide resolved
charts/datadog/values.yaml Outdated Show resolved Hide resolved
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 @dineshg13

Thank you for considering all my requests for changes. 🙇
I think the result is great the user experience for OTEL user is now good 👍

cheers

@dineshg13
Copy link
Member Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jul 23, 2024

❌ MergeQueue

You are not allowed to use the merge queue towards main.

If you need support, contact us on Slack #devflow with those details!

@levan-m
Copy link
Contributor

levan-m commented Jul 23, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jul 23, 2024

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

Use /merge -c to cancel this operation!

@dd-devflow
Copy link

dd-devflow bot commented Jul 23, 2024

🚂 MergeQueue: pull request added to the queue

The median merge time in main is 38m.

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit 97c1f22 into main Jul 23, 2024
19 checks passed
@dd-mergequeue dd-mergequeue bot deleted the dinesh.gurumurthy/OASIS-17-2 branch July 23, 2024 20:19
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 documentation Improvements or additions to documentation mergequeue-status: done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants