-
Notifications
You must be signed in to change notification settings - Fork 131
Update docs for upstream resolution patterns #950
Conversation
🎊 PR Preview has been successfully built and deployed to https://localstack-docs-preview-pr-950.surge.sh 🎊 |
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.
I think we always provide an explicit migration path when deprecating variables.
Added some other minor suggestions
@@ -309,7 +309,8 @@ To learn more about these configuration options, see [DNS Server]({{< ref "dns-s | |||
| `DNS_ADDRESS` | `0.0.0.0` (default) | Address the LocalStack should bind the DNS server on (port 53 tcp/udp). Value `0` to disable. | |||
| `DNS_SERVER` | Default upstream DNS or `8.8.8.8` (default) | Fallback DNS server for queries not handled by LocalStack. | |||
| `DNS_RESOLVE_IP` | `127.0.0.1` (default) | IP address the DNS server should return as A record for queries handled by LocalStack. If customized, this value will be returned in preference to the DNS server response. | |||
| `DNS_LOCAL_NAME_PATTERNS` | `.*(ecr\|lambda).*.amazonaws.com` (example) | Skiplist of hostnames that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. | |||
| `DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM` | | Skiplist of domain names that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. | |||
| `DNS_LOCAL_NAME_PATTERNS` | `.*(ecr\|lambda).*.amazonaws.com` (example) | **Deprecated since 3.0.0** Skiplist of domain names that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. |
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.
shouldn't it be 3.0.2
(technically 🤔 )
(sidenote: It would be useful to add the version since it is supported in the future. Lots of 🚧 in config management ...)
@@ -309,7 +309,8 @@ To learn more about these configuration options, see [DNS Server]({{< ref "dns-s | |||
| `DNS_ADDRESS` | `0.0.0.0` (default) | Address the LocalStack should bind the DNS server on (port 53 tcp/udp). Value `0` to disable. | |||
| `DNS_SERVER` | Default upstream DNS or `8.8.8.8` (default) | Fallback DNS server for queries not handled by LocalStack. | |||
| `DNS_RESOLVE_IP` | `127.0.0.1` (default) | IP address the DNS server should return as A record for queries handled by LocalStack. If customized, this value will be returned in preference to the DNS server response. | |||
| `DNS_LOCAL_NAME_PATTERNS` | `.*(ecr\|lambda).*.amazonaws.com` (example) | Skiplist of hostnames that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. | |||
| `DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM` | | Skiplist of domain names that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. | |||
| `DNS_LOCAL_NAME_PATTERNS` | `.*(ecr\|lambda).*.amazonaws.com` (example) | **Deprecated since 3.0.0** Skiplist of domain names that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. |
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.
Can we add a migration path?
Renamed to DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM
@@ -309,7 +309,8 @@ To learn more about these configuration options, see [DNS Server]({{< ref "dns-s | |||
| `DNS_ADDRESS` | `0.0.0.0` (default) | Address the LocalStack should bind the DNS server on (port 53 tcp/udp). Value `0` to disable. | |||
| `DNS_SERVER` | Default upstream DNS or `8.8.8.8` (default) | Fallback DNS server for queries not handled by LocalStack. | |||
| `DNS_RESOLVE_IP` | `127.0.0.1` (default) | IP address the DNS server should return as A record for queries handled by LocalStack. If customized, this value will be returned in preference to the DNS server response. | |||
| `DNS_LOCAL_NAME_PATTERNS` | `.*(ecr\|lambda).*.amazonaws.com` (example) | Skiplist of hostnames that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. | |||
| `DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM` | | Skiplist of domain names that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. |
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.
Consider linking to the DNS server page for more details: https://docs.localstack.cloud/user-guide/tools/dns-server/#skip-localstack-dns-resolution
@@ -309,7 +309,8 @@ To learn more about these configuration options, see [DNS Server]({{< ref "dns-s | |||
| `DNS_ADDRESS` | `0.0.0.0` (default) | Address the LocalStack should bind the DNS server on (port 53 tcp/udp). Value `0` to disable. | |||
| `DNS_SERVER` | Default upstream DNS or `8.8.8.8` (default) | Fallback DNS server for queries not handled by LocalStack. | |||
| `DNS_RESOLVE_IP` | `127.0.0.1` (default) | IP address the DNS server should return as A record for queries handled by LocalStack. If customized, this value will be returned in preference to the DNS server response. | |||
| `DNS_LOCAL_NAME_PATTERNS` | `.*(ecr\|lambda).*.amazonaws.com` (example) | Skiplist of hostnames that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. | |||
| `DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM` | | Skiplist of domain names that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. |
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.
Missing example value (better provide the example with the current config)
@@ -309,7 +309,8 @@ To learn more about these configuration options, see [DNS Server]({{< ref "dns-s | |||
| `DNS_ADDRESS` | `0.0.0.0` (default) | Address the LocalStack should bind the DNS server on (port 53 tcp/udp). Value `0` to disable. | |||
| `DNS_SERVER` | Default upstream DNS or `8.8.8.8` (default) | Fallback DNS server for queries not handled by LocalStack. | |||
| `DNS_RESOLVE_IP` | `127.0.0.1` (default) | IP address the DNS server should return as A record for queries handled by LocalStack. If customized, this value will be returned in preference to the DNS server response. | |||
| `DNS_LOCAL_NAME_PATTERNS` | `.*(ecr\|lambda).*.amazonaws.com` (example) | Skiplist of hostnames that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. | |||
| `DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM` | | Skiplist of domain names that should *NOT* be resolved to the LocalStack container, as a comma-separated list of Python-flavored regex patterns. |
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.
nit: ideally, we adjust the explanation to the new naming (rather than skip, explain that these are always resolved by upstream)
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.
LGTM 👍
Motivation
With localstack/localstack#9692 we deprecated the use of
DNS_LOCAL_NAME_PATTERNS
since it had a confusing name. Instead of adding domain name patterns to resolve to LocalStack, it added domain names to the skiplist of names that should always be resolved upstream. In particular, with transparent endpoint injection enabled,s3.amazonaws.com
would resolve to LocalStack, andDNS_LOCAL_NAME_PATTERNS
could force LocalStack to resolve the name from its upstream resolver.Changes
DNS_LOCAL_NAME_PATTERNS
to use the newDNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM
variableTODO