You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/envoy-gateway-setup.md
+86Lines changed: 86 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,6 +160,92 @@ envoyProxy:
160
160
161
161
Adjust this section for a different cluster. On cloud providers, this may be replaced by provider-specific load balancer annotations or omitted entirely.
162
162
163
+
## MetalLB IP Assignment
164
+
165
+
The following values describe the current production Theia cluster. Treat them as an example of the pattern, not as universal defaults. Other deployments must use their own MetalLB pools, external IPs, DNS records, and load-balancer annotations.
166
+
167
+
In the current Artemis cluster, MetalLB exposes two single-address pools:
168
+
169
+
| Pool | Address | DNS label on the pool | Current purpose |
170
+
| --- | --- | --- | --- |
171
+
| `general` | `131.159.88.81/32` | `k8s-theia-lb0.aet.cit.tum.de` | general load balancer pool, not assigned to Envoy Gateway |
The production Theia DNS names in this cluster resolve to `k8s-theia-lb1.aet.cit.tum.de`, which resolves to `131.159.88.82`. Therefore this deployment's Envoy Gateway data-plane service must receive `131.159.88.82`, not the other MetalLB address.
175
+
176
+
The general procedure is to choose the MetalLB pool and external address that DNS points to, then encode that choice in the shared gateway values. In this production setup, that is enforced through the shared gateway production values, not by manually editing the generated service. The `theia-shared-gateway` chart creates an Envoy Gateway `EnvoyProxy` resource with:
177
+
178
+
```yaml
179
+
envoyProxy:
180
+
create: true
181
+
name: theia-shared-gateway
182
+
namespace: envoy-gateway-system
183
+
spec:
184
+
provider:
185
+
type: Kubernetes
186
+
kubernetes:
187
+
envoyService:
188
+
annotations:
189
+
metallb.io/address-pool: ingress
190
+
metallb.io/loadBalancerIPs: 131.159.88.82
191
+
externalTrafficPolicy: Local
192
+
type: LoadBalancer
193
+
```
194
+
195
+
Envoy Gateway reads this `EnvoyProxy` configuration and creates the actual data-plane service in `envoy-gateway-system`. The live service is named like:
That service is generated and managed by Envoy Gateway. It currently has these relevant annotations and status:
202
+
203
+
```yaml
204
+
metadata:
205
+
annotations:
206
+
metallb.io/address-pool: ingress
207
+
metallb.io/ip-allocated-from-pool: ingress
208
+
metallb.io/loadBalancerIPs: 131.159.88.82
209
+
spec:
210
+
type: LoadBalancer
211
+
clusterIP: 198.19.125.184
212
+
externalTrafficPolicy: Local
213
+
status:
214
+
loadBalancer:
215
+
ingress:
216
+
- ip: 131.159.88.82
217
+
```
218
+
219
+
The `clusterIP` is only the internal Kubernetes service address. Public DNS must point to the MetalLB-assigned LoadBalancer address in `status.loadBalancer.ingress`, not to the internal `clusterIP`.
220
+
221
+
The `metallb.io/address-pool: ingress` annotation selects the MetalLB pool. The `metallb.io/loadBalancerIPs: 131.159.88.82` annotation pins the exact address from that pool. MetalLB then records the actual allocation with `metallb.io/ip-allocated-from-pool: ingress` and publishes the address in the service status.
222
+
223
+
Do not rely on MetalLB auto-assignment when the public DNS name must target a specific address. In the production cluster, both pools have `autoAssign: true`, so without the explicit EnvoyProxy annotations a new LoadBalancer service could receive the wrong address. If Envoy Gateway receives `131.159.88.81` while public DNS points at `131.159.88.82`, Theia hostnames will resolve to an address that is not serving the Gateway.
224
+
225
+
For a different deployment, adapt all of the following together:
226
+
227
+
- the MetalLB `IPAddressPool` name
228
+
- the exact external IP requested through `metallb.io/loadBalancerIPs`
229
+
- the DNS `A` / `AAAA` records for the public Theia hostnames
230
+
- the shared gateway `EnvoyProxy` load-balancer annotations
231
+
- any provider-specific load balancer annotations if the cluster does not use MetalLB
232
+
233
+
Use these checks after installing or changing the shared gateway:
234
+
235
+
```bash
236
+
kubectl get ipaddresspools.metallb.io -n metallb-system
237
+
kubectl get l2advertisements.metallb.io -n metallb-system
238
+
kubectl get envoyproxy theia-shared-gateway -n envoy-gateway-system -o yaml
In the current Artemis production setup, the expected result is that the Envoy Gateway LoadBalancer service and the public DNS chain both end at `131.159.88.82`. In another deployment, the same check should end at that deployment's chosen public load-balancer address.
248
+
163
249
## Configure Tenant Theia Releases
164
250
165
251
Each tenant environment should attach its routes to the shared Gateway instead of creating a namespace-local Gateway:
0 commit comments