Skip to content

Commit

Permalink
add note about service upstream env var dot broken
Browse files Browse the repository at this point in the history
  • Loading branch information
im2nguyen committed Sep 19, 2023
1 parent 170417a commit 8a0896d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion website/content/docs/k8s/annotations-and-labels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ The following Kubernetes resource annotations could be used on a pod to control
local port to listen for those connections. When transparent proxy is enabled,
this annotation is optional. This annotation can be either _labeled_ or _unlabeled_. We recommend the labeled format because it has a more consistent syntax and can be used to reference cluster peers as upstreams.

- **Labeled**:
<Note>

If the upstream annotation contains a dot (for example, `static-server.svc:8080`), you may not be able to reference the auto-generated environment variables (`<NAME>_CONNECT_SERVICE_HOST` and `<NAME>_CONNECT_SERVICE_PORT`) since the environment variables will also contain the dot.

</Note>

- **Labeled**:

The labeled annotation format allows you to reference any service as an upstream. You can specify a Consul Enterprise namespace. You can also specify an admin partition in the same datacenter, a cluster peer, or a WAN-federated datacenter.

Expand Down
6 changes: 6 additions & 0 deletions website/content/docs/k8s/connect/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ upstream. This is analogous to the standard Kubernetes service environment varia
point instead to the correct local proxy port to establish connections via
service mesh.

<Note>

If the upstream annotation contains a dot (for example, `static-server.svc:8080`), you may not be able to reference the auto-generated environment variables (`<NAME>_CONNECT_SERVICE_HOST` and `<NAME>_CONNECT_SERVICE_PORT`) since the environment variables will also contain the dot.

</Note>

You can verify access to the static text server using `kubectl exec`.
Because transparent proxy is enabled by default,
use Kubernetes DNS to connect to your desired upstream.
Expand Down

0 comments on commit 8a0896d

Please sign in to comment.