Skip to content

Commit 2f4ad51

Browse files
obezpalkoclaude
andcommitted
fix: restore GatewayClass creation — Envoy Gateway chart does not create one
Envoy Gateway installs the GatewayClass CRD but no GatewayClass instance. Added gateway.createClass (default true) so the first namespace install creates it; subsequent installs set createClass=false to avoid conflicts. helm.sh/resource-policy:keep prevents accidental deletion on uninstall. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5941b9e commit 2f4ad51

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ helm install envoy-router oci://ghcr.io/comet-ml/charts/envoy-router \
3737
--version 0.1.0 --namespace ns-1 --create-namespace
3838
```
3939

40-
For multiple namespaces, repeat:
40+
For multiple namespaces, the `GatewayClass` only needs to be created once (it is cluster-scoped). Set `gateway.createClass=false` for subsequent installs:
4141

4242
```bash
4343
helm install envoy-router oci://ghcr.io/comet-ml/charts/envoy-router \
44-
--version 0.1.0 --namespace ns-2 --create-namespace
44+
--version 0.1.0 --namespace ns-2 --create-namespace \
45+
--set gateway.createClass=false
4546
```
4647

4748
```
@@ -69,7 +70,8 @@ The pod will be reachable at `https://your-domain.com/<pod-name>/` within second
6970
|---|---|---|
7071
| `operator.podPort` | `8080` | Port the pods listen on |
7172
| `gateway.create` | `true` | Set `false` to skip Gateway creation |
72-
| `gateway.className` | `eg` | GatewayClass (Envoy Gateway installs `eg` by default) |
73+
| `gateway.createClass` | `true` | Create the GatewayClass (cluster-scoped — set `false` for 2nd+ namespace installs) |
74+
| `gateway.className` | `envoy-router` | GatewayClass name |
7375
| `gateway.port` | `80` | Listener port on the Gateway |
7476

7577
## Development
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{- if .Values.gateway.createClass -}}
2+
apiVersion: gateway.networking.k8s.io/v1
3+
kind: GatewayClass
4+
metadata:
5+
name: {{ .Values.gateway.className }}
6+
labels:
7+
app.kubernetes.io/name: {{ include "envoy-router.name" . }}
8+
app.kubernetes.io/instance: {{ .Release.Name }}
9+
annotations:
10+
# keep prevents deletion when this namespace's release is uninstalled
11+
helm.sh/resource-policy: keep
12+
spec:
13+
controllerName: gateway.envoyproxy.io/gatewayclass-controller
14+
{{- end }}

charts/envoy-router/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ serviceAccount:
1212
# Gateway resource created in the same namespace as the operator.
1313
# Uses the "eg" GatewayClass that Envoy Gateway installs automatically.
1414
gateway:
15+
# createClass: create the GatewayClass (cluster-scoped, only needed once per cluster)
16+
createClass: true
1517
create: true
16-
className: eg
18+
className: envoy-router
1719
name: envoy-router
1820
port: 80
1921
# Same: only HTTPRoutes from this namespace attach (per-namespace model)

0 commit comments

Comments
 (0)