Skip to content

Commit 6a124e6

Browse files
authored
docs(k8s): add HTTPRoutes support (#6854)
Signed-off-by: germangarces <german.garces@flagsmith.com>
1 parent 26d703e commit 6a124e6

1 file changed

Lines changed: 83 additions & 1 deletion

File tree

docs/docs/deployment-self-hosting/hosting-guides/kubernetes-openshift.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,88 @@ Run `minikube ip`. Set this IP and `flagsmith.local` in your `/etc/hosts`, for e
139139

140140
Then access `http://flagsmith.local` in a browser.
141141

142+
### Using Gateway API (alternative to Ingress)
143+
144+
The chart supports [Gateway API](https://gateway-api.sigs.k8s.io/) HTTPRoutes as an alternative to Ingress resources.
145+
146+
#### Prerequisites
147+
148+
Install these independently before enabling HTTPRoutes:
149+
150+
1. **Gateway API CRDs**:
151+
```bash
152+
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/latest/download/standard-install.yaml
153+
```
154+
2. **A Gateway controller** (e.g., [Envoy Gateway](https://gateway.envoyproxy.io/), Cilium, Istio)
155+
3. **A GatewayClass and Gateway resource** in your cluster. For example, using Envoy Gateway:
156+
157+
```yaml
158+
apiVersion: gateway.networking.k8s.io/v1
159+
kind: GatewayClass
160+
metadata:
161+
name: eg
162+
spec:
163+
controllerName: gateway.envoyproxy.io/gatewayclass-controller
164+
---
165+
apiVersion: gateway.networking.k8s.io/v1
166+
kind: Gateway
167+
metadata:
168+
name: my-gateway
169+
namespace: gateway-ns
170+
spec:
171+
gatewayClassName: eg
172+
listeners:
173+
- name: http
174+
port: 80
175+
protocol: HTTP
176+
allowedRoutes:
177+
namespaces:
178+
from: All
179+
```
180+
181+
#### Configuration
182+
183+
The chart only manages HTTPRoute resources. The frontend defaults to routing `/` to the frontend service. The API and SSE routes have no defaults — you must provide rules explicitly.
184+
185+
A typical configuration with separate frontend and API routes:
186+
187+
```yaml
188+
gateway:
189+
frontend:
190+
enabled: true
191+
parentRefs:
192+
- name: my-gateway
193+
namespace: gateway-ns
194+
api:
195+
enabled: true
196+
parentRefs:
197+
- name: my-gateway
198+
namespace: gateway-ns
199+
rules:
200+
- matches:
201+
- path:
202+
type: PathPrefix
203+
value: /api/
204+
- path:
205+
type: PathPrefix
206+
value: /health/
207+
- path:
208+
type: PathPrefix
209+
value: /admin/
210+
- path:
211+
type: PathPrefix
212+
value: /static/admin/
213+
backendRefs:
214+
- name: flagsmith-api
215+
port: 8000
216+
217+
frontend:
218+
extraEnv:
219+
FLAGSMITH_API_URL: 'https://flagsmith.[MYDOMAIN]/api/v1/'
220+
```
221+
222+
See the [`values.yaml`](https://github.com/Flagsmith/flagsmith-charts/blob/main/charts/flagsmith/values.yaml) for all available options.
223+
142224
### Provided Database configuration
143225

144226
By default, the chart creates its own PostgreSQL server within the cluster, referencing [https://github.com/helm/charts/tree/master/stable/postgresql](https://github.com/helm/charts/tree/master/stable/postgresql) for the service.
@@ -522,4 +604,4 @@ To build chart package run:
522604

523605
```bash
524606
helm package ./flagsmith
525-
```
607+
```

0 commit comments

Comments
 (0)