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

Fix APM HostPort configuration #338

Merged
merged 1 commit into from
Jul 23, 2021
Merged

Conversation

clamoriniere
Copy link
Collaborator

What does this PR do?

When APM enable, configure automaticaly the TCP port as a HostPort.

Fixes: #312

Motivation

Allow the usage of APM in applicative pod with the TCP communication.

Additional Notes

N/A

Describe your test plan

Deploy the the agent with

apiVersion: datadoghq.com/v1alpha1
kind: DatadogAgent
#...
spec:
  #...
  agent:
    # ...
    apm:
      enabled: true

the port 8126 on the trace-agent container should be created with the hostPort option.

@clamoriniere clamoriniere added bug Something isn't working component/controller labels Jul 23, 2021
@clamoriniere clamoriniere added this to the v0.7 milestone Jul 23, 2021
@clamoriniere clamoriniere requested a review from a team as a code owner July 23, 2021 10:07
@codecov-commenter
Copy link

Codecov Report

Merging #338 (9c8146d) into main (ba84e08) will increase coverage by 0.31%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #338      +/-   ##
==========================================
+ Coverage   63.58%   63.90%   +0.31%     
==========================================
  Files          61       61              
  Lines        6704     6705       +1     
==========================================
+ Hits         4263     4285      +22     
+ Misses       2134     2113      -21     
  Partials      307      307              
Flag Coverage Δ
unittests 63.90% <100.00%> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
controllers/datadogagent/utils.go 83.60% <100.00%> (+0.01%) ⬆️
api/v1alpha1/datadogagent_default.go 83.24% <0.00%> (+3.86%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba84e08...9c8146d. Read the comment docs.

@clamoriniere clamoriniere merged commit 17569f7 into main Jul 23, 2021
@clamoriniere clamoriniere deleted the clamoriniere/fix-apm-hostport branch July 23, 2021 10:26
anderscarling added a commit to anderscarling/terraform-modules that referenced this pull request Sep 2, 2021
Host port seems to be the main supported way to receive apm traces to the apm agent.

It seems to be the recommended configuration here: https://docs.datadoghq.com/agent/kubernetes/apm/?tab=operator

And will be the default configuration from next release (v0.7.0): DataDog/datadog-operator#338
NissesSenap pushed a commit to XenitAB/terraform-modules that referenced this pull request Sep 2, 2021
Host port seems to be the main supported way to receive apm traces to the apm agent.

It seems to be the recommended configuration here: https://docs.datadoghq.com/agent/kubernetes/apm/?tab=operator

And will be the default configuration from next release (v0.7.0): DataDog/datadog-operator#338
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component/controller
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable DD_APM_NON_LOCAL_TRAFFIC and hostPort by default if apm=true
3 participants