-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Document NO_PROXY configuration and matching rules #37802
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
base: master
Are you sure you want to change the base?
Changes from all commits
e2a0339
862475c
5b92619
72db011
6ba366a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,9 +25,10 @@ | |||||||||||||
|
|
||||||||||||||
| ## Configure the Datadog Agent | ||||||||||||||
|
|
||||||||||||||
| There are two options for configuring the Datadog Agent to use a proxy. | ||||||||||||||
| There are several options for configuring the Datadog Agent to use a proxy depending on your deployment method. | ||||||||||||||
| - You can use the Agent configuration file. | ||||||||||||||
| - You can use environment variables. Environment variables override configuration file settings. | ||||||||||||||
| - For Kubernetes deployments, you can configure the proxy through Helm or the Datadog Operator. | ||||||||||||||
|
|
||||||||||||||
| ### Configuration file | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -79,6 +80,78 @@ | |||||||||||||
| DD_LOGS_CONFIG_FORCE_USE_HTTP=true | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ### Kubernetes | ||||||||||||||
|
|
||||||||||||||
| {{< tabs >}} | ||||||||||||||
| {{% tab "Helm" %}} | ||||||||||||||
|
|
||||||||||||||
| Add the following to your `values.yaml`: | ||||||||||||||
|
|
||||||||||||||
| ```yaml | ||||||||||||||
| datadog: | ||||||||||||||
| env: | ||||||||||||||
| - name: DD_PROXY_HTTP | ||||||||||||||
| value: "http://<PROXY_SERVICE>.<PROXY_NAMESPACE>.svc.cluster.local:<PROXY_PORT>" | ||||||||||||||
| - name: DD_PROXY_HTTPS | ||||||||||||||
| value: "http://<PROXY_SERVICE>.<PROXY_NAMESPACE>.svc.cluster.local:<PROXY_PORT>" | ||||||||||||||
| - name: DD_PROXY_NO_PROXY | ||||||||||||||
| value: "<HOST_TO_BYPASS_1> <HOST_TO_BYPASS_2>" | ||||||||||||||
| - name: DD_NO_PROXY_NONEXACT_MATCH | ||||||||||||||
| value: "true" | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| {{% /tab %}} | ||||||||||||||
| {{% tab "Operator" %}} | ||||||||||||||
|
|
||||||||||||||
| Add the following to your `DatadogAgent` CR: | ||||||||||||||
|
|
||||||||||||||
| ```yaml | ||||||||||||||
| spec: | ||||||||||||||
| global: | ||||||||||||||
| env: | ||||||||||||||
| - name: DD_PROXY_HTTP | ||||||||||||||
| value: "http://<PROXY_SERVICE>.<PROXY_NAMESPACE>.svc.cluster.local:<PROXY_PORT>" | ||||||||||||||
| - name: DD_PROXY_HTTPS | ||||||||||||||
| value: "http://<PROXY_SERVICE>.<PROXY_NAMESPACE>.svc.cluster.local:<PROXY_PORT>" | ||||||||||||||
| - name: DD_PROXY_NO_PROXY | ||||||||||||||
| value: "<HOST_TO_BYPASS_1> <HOST_TO_BYPASS_2>" | ||||||||||||||
| - name: DD_NO_PROXY_NONEXACT_MATCH | ||||||||||||||
| value: "true" | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| {{% /tab %}} | ||||||||||||||
| {{< /tabs >}} | ||||||||||||||
|
|
||||||||||||||
| ## `NO_PROXY` accepted values | ||||||||||||||
|
|
||||||||||||||
| By default, `no_proxy`/`NO_PROXY` must match endpoints exactly for Agent HTTP(S) requests (except requests performed by Agent integrations). It is recommended to enable `no_proxy_nonexact_match` to make the Agent match `NO_PROXY` values with the same rules used for Agent integrations. | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style: Use a direct, active voice instead of "It is recommended to". Also, the existing config example above (line 53) already uses
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style: Prefer active voice — this matches the existing phrasing later in the file ("Datadog recommends using an HTTP proxy like Squid").
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| {{< tabs >}} | ||||||||||||||
| {{% tab "Configuration file" %}} | ||||||||||||||
| ```yaml | ||||||||||||||
| no_proxy_nonexact_match: true | ||||||||||||||
| ``` | ||||||||||||||
| {{% /tab %}} | ||||||||||||||
| {{% tab "Environment variable" %}} | ||||||||||||||
| ```bash | ||||||||||||||
| DD_NO_PROXY_NONEXACT_MATCH=true | ||||||||||||||
| ``` | ||||||||||||||
| {{% /tab %}} | ||||||||||||||
| {{< /tabs >}} | ||||||||||||||
|
|
||||||||||||||
| The following rules apply to Agent integrations (and the whole Agent when `no_proxy_nonexact_match` is enabled): | ||||||||||||||
| * A domain name matches that name and all subdomains, for example: | ||||||||||||||
| - `datadoghq.com` matches `app.agent.datadoghq.com`, `www.datadoghq.com`, `datadoghq.com`, but **not** `www.notdatadoghq.com` | ||||||||||||||
| - `datadoghq` matches `frontend.datadoghq`, `backend.datadoghq`, but **not** `www.datadoghq.com` nor `www.datadoghq.eu` | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style: "nor" without a preceding "neither" reads awkwardly; use "or" for parallelism with the other bullets.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree with this suggestion, please update - thank you! |
||||||||||||||
| * A domain name with a leading "." matches subdomains only, for example: | ||||||||||||||
| - `.datadoghq.com` matches `app.agent.datadoghq.com`, `www.datadoghq.com`, but **not** `datadoghq.com` | ||||||||||||||
| * A CIDR range matches an IP address within the subnet, for example: | ||||||||||||||
| - `192.168.1.0/24` matches IP range `192.168.1.1` through `192.168.1.254` | ||||||||||||||
| * An exact IP address, for example: | ||||||||||||||
| - `169.254.169.254` | ||||||||||||||
| * A hostname, for example: | ||||||||||||||
| - `webserver1` | ||||||||||||||
|
|
||||||||||||||
| ## Proxy Server Setup Examples | ||||||||||||||
|
|
||||||||||||||
| If you don't have an existing proxy server, Datadog recommends using an HTTP proxy like **Squid**. | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: Add a comma before the qualifying clause for readability.