Skip to content

Commit 977e9ef

Browse files
authored
docs: add steps for configuring trusted headers & origins in Helm chart (coder#8031)
1 parent 8ac68c9 commit 977e9ef

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

docs/install/kubernetes.md

+27-10
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,34 @@ to log in and manage templates.
121121
sessionAffinity: None
122122
```
123123
124-
AWS however recommends a Network load balancer in lieu of the Classic load balancer. Use the following `values.yaml` settings to request a Network load balancer:
124+
### Load balancing considerations
125+
126+
AWS however recommends a Network load balancer in lieu of the Classic load balancer. Use the following `values.yaml` settings to request a Network load balancer:
127+
128+
```yaml
129+
coder:
130+
service:
131+
externalTrafficPolicy: Local
132+
sessionAffinity: None
133+
annotations: {
134+
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
135+
}
136+
```
125137

126-
```yaml
127-
coder:
128-
service:
129-
externalTrafficPolicy: Local
130-
sessionAffinity: None
131-
annotations: {
132-
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
133-
}
134-
```
138+
By default, Coder will set the `externalTrafficPolicy` to `Cluster` which will
139+
mask client IP addresses in the Audit log. To preserve the source IP, you can either
140+
set this value to `Local`, or pass through the client IP via the X-Forwarded-For
141+
header. To configure the latter, set the following environment
142+
variables:
143+
144+
```yaml
145+
coder:
146+
env:
147+
- name: CODER_PROXY_TRUSTED_HEADERS
148+
value: X-Forwarded-For
149+
- name: CODER_PROXY_TRUSTED_ORIGINS
150+
value: 10.0.0.1/8 # this will be the CIDR range of your Load Balancer IP address
151+
```
135152

136153
1. Run the following command to install the chart in your cluster.
137154

0 commit comments

Comments
 (0)