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

Configure tracing address as the downward API ref to status.hostIP #426

Merged
merged 2 commits into from
Jan 26, 2021
Merged

Configure tracing address as the downward API ref to status.hostIP #426

merged 2 commits into from
Jan 26, 2021

Conversation

fawadkhaliq
Copy link

@fawadkhaliq fawadkhaliq commented Jan 22, 2021

Issue #425

Description of changes
Some of the tracing providers support running agents as daemonsets (e.g. DataDog). If the agent is running on node locally and bound to the node local IP address, the tracing agent IP address will be different for every Envoy. AppMesh controller takes a global endpoint that is supposed to be same for every Envoy (either a service endpoint or a localhost for sidecar tracing agents). This works well for agents running at cluster level or as sidecars. However, anything running as a daemonset will not be able to receive traces.

This change adds support to use the k8s downward API to reference the pod status.hostIP. For daemonsets running on host network namespace, status.hostIP Envoy will be able to send traces to them.

Also, removed the fragile approach of text/template rendering of the Envoy container spec string JSON we were using and moved into the sidecar builder using proper container type.

Usage/example
e.g. Enable DataDog tracing and point Envoy sidecars to their node local DataDog daemonsets running on host network namespace. You will need to set the following flags and values at controller init:

--enable-datadog-tracing=true
--datadog-port=8126
--datadog-address=ref:status.hostIP

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@fawadkhaliq fawadkhaliq requested a review from achevuru January 22, 2021 05:47
@achevuru
Copy link
Contributor

Moving away from templates will run in to a conflict with the current mTLS merge PR. Might be better, we merge that first and add support for the new SDS_UDS_PATH env variable in the current flow as well. Should be a minor change on top of this diff.

@fawadkhaliq
Copy link
Author

Moving away from templates will run in to a conflict with the current mTLS merge PR. Might be better, we merge that first and add support for the new SDS_UDS_PATH env variable in the current flow as well. Should be a minor change on top of this diff.

Sounds good. Will rebase on top of mTLS PR

@fawadkhaliq fawadkhaliq requested a review from achevuru January 26, 2021 02:21
pkg/inject/envoy.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants