Skip to content

Commit 54c734d

Browse files
authored
Merge pull request #159 from homarr-labs/158-feat-support-httproute
feat(httproute): add HttpRoute support
2 parents 2cc0766 + 9d5d54d commit 54c734d

File tree

5 files changed

+154
-4
lines changed

5 files changed

+154
-4
lines changed

charts/homarr/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: homarr
33
description: A Helm chart to deploy homarr for Kubernetes
44
home: https://homarr-labs.github.io/charts/charts/homarr/
55
type: application
6-
version: 5.13.0
6+
version: 6.0.0
77
# renovate datasource=docker depName=ghcr.io/homarr-labs/homarr
88
appVersion: "v1.39.0"
99
icon: https://raw.githubusercontent.com/homarr-labs/charts/refs/heads/main/charts/homarr/icon.svg
@@ -26,8 +26,8 @@ annotations:
2626
fingerprint: 36F9A886ABA6AA4C1588B942E7EC1AA0EFD54840
2727
url: https://homarr-labs.github.io/charts/pgp_keys.asc
2828
artifacthub.io/changes: |-
29-
- kind: changed
30-
description: Update ghcr.io/homarr-labs/homarr docker tag to v1.39.0
29+
- kind: added
30+
description: add HttpRoute support
3131
artifacthub.io/links: |-
3232
- name: App Source
3333
url: https://github.com/homarr-labs/homarr

charts/homarr/README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<img src="https://raw.githubusercontent.com/homarr-labs/charts/refs/heads/main/charts/homarr/icon.svg" align="right" width="92" alt="homarr logo">
44

5-
![Version: 5.13.0](https://img.shields.io/badge/Version-5.13.0-informational?style=flat)
5+
![Version: 6.0.0](https://img.shields.io/badge/Version-6.0.0-informational?style=flat)
66
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat)
77
![AppVersion: v1.39.0](https://img.shields.io/badge/AppVersion-v1.39.0-informational?style=flat)
88

@@ -240,6 +240,42 @@ ingress:
240240
````
241241
</details>
242242

243+
### HTTPRoute (Gateway API)
244+
245+
The httproute section in the values.yaml file allows you to configure how external traffic accesses your application using the Kubernetes Gateway API.
246+
This provides a more expressive and future-proof alternative to Ingress, with support for advanced routing, filters, and multiple parent Gateways.
247+
248+
<details>
249+
<summary>values.yaml</summary>
250+
251+
````yaml
252+
service:
253+
enabled: true # must be enabled for HTTPRoute to forward traffic
254+
httproute:
255+
enabled: true
256+
parentRefs:
257+
- name: my-gateway
258+
namespace: default
259+
hostnames:
260+
- homarr.homelab.dev
261+
rules:
262+
- matches:
263+
- path:
264+
type: PathPrefix
265+
value: /
266+
backendRefs:
267+
- name: homarr
268+
port: 8080
269+
````
270+
</details>
271+
272+
#### Notes:
273+
274+
- parentRefs: the Gateway(s) this route attaches to. Gateways must already exist.
275+
- hostnames: domain names this route applies to.
276+
- rules: each rule can define matches (paths, headers, queries), optional filters, and backendRefs to services
277+
- TLS must be configured on the Gateway (not on HTTPRoute). For example, the Gateway can have a TLS listener for homarr.homelab.dev, and this route will automatically apply once matched.
278+
243279
### Certificates
244280

245281
Configuration for trusted certificate persistence. Supports:
@@ -386,6 +422,14 @@ All available values are listed on the [artifacthub](https://artifacthub.io/pack
386422
| envSecrets.dbCredentials.existingSecret | string | `"db-secret"` | Name of existing secret containing DB credentials |
387423
| fullnameOverride | string | `""` | Overrides chart's fullname |
388424
| hostAliases | list | `[]` | Add static entries to /etc/hosts in the Pod. This is useful in the following cases: - You are running in a dual-stack cluster (IPv4 + IPv6) and want to force usage of IPv4 for specific hostnames - Your application is having DNS resolution issues or IPv6 preference issues - You need to override or simulate DNS entries without changing global DNS - You are running in an air-gapped or isolated environment without external DNS Example: hostAliases: - ip: "192.168.1.10" hostnames: - "example.com" - "example.internal" |
425+
| httproute | object | `{"enabled":false,"hostnames":["chart-example.local"],"parentRefs":[{"name":"my-gateway","namespace":"default"}],"rules":[{"backendRefs":[{"name":"homarr","port":8080}],"filters":[],"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]}` | Gateway API HTTPRoute configuration |
426+
| httproute.enabled | bool | `false` | Enable HTTPRoute |
427+
| httproute.hostnames | list | `["chart-example.local"]` | Hostnames this route matches (similar to ingress.hosts.host) |
428+
| httproute.parentRefs | list | `[{"name":"my-gateway","namespace":"default"}]` | References to the parent Gateway(s) this route attaches to. Each item must include at least a `name`, and optionally a `namespace`. |
429+
| httproute.rules | list | `[{"backendRefs":[{"name":"homarr","port":8080}],"filters":[],"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]` | List of routing rules. Each rule can include: - matches: path/header/query matching - filters: optional transformations (redirects, header modifications, etc.) - backendRefs: one or more Kubernetes Services to forward traffic to |
430+
| httproute.rules[0].filters | list | `[]` | Optional filters for this rule (default: empty) |
431+
| httproute.rules[0].matches[0].path.type | string | `"PathPrefix"` | Path match type. One of: Exact, PathPrefix, RegularExpression |
432+
| httproute.rules[0].matches[0].path.value | string | `"/"` | Path value to match |
389433
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
390434
| image.repository | string | `"ghcr.io/homarr-labs/homarr"` | Image repository |
391435
| image.tag | string | `"v1.39.0"` | Overrides the image tag whose default is the chart appVersion |

charts/homarr/README_CONFIG.md.gotmpl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,42 @@ ingress:
179179
````
180180
</details>
181181

182+
### HTTPRoute (Gateway API)
183+
184+
The httproute section in the values.yaml file allows you to configure how external traffic accesses your application using the Kubernetes Gateway API.
185+
This provides a more expressive and future-proof alternative to Ingress, with support for advanced routing, filters, and multiple parent Gateways.
186+
187+
<details>
188+
<summary>values.yaml</summary>
189+
190+
````yaml
191+
service:
192+
enabled: true # must be enabled for HTTPRoute to forward traffic
193+
httproute:
194+
enabled: true
195+
parentRefs:
196+
- name: my-gateway
197+
namespace: default
198+
hostnames:
199+
- homarr.homelab.dev
200+
rules:
201+
- matches:
202+
- path:
203+
type: PathPrefix
204+
value: /
205+
backendRefs:
206+
- name: homarr
207+
port: 8080
208+
````
209+
</details>
210+
211+
#### Notes:
212+
213+
- parentRefs: the Gateway(s) this route attaches to. Gateways must already exist.
214+
- hostnames: domain names this route applies to.
215+
- rules: each rule can define matches (paths, headers, queries), optional filters, and backendRefs to services
216+
- TLS must be configured on the Gateway (not on HTTPRoute). For example, the Gateway can have a TLS listener for homarr.homelab.dev, and this route will automatically apply once matched.
217+
182218
### Certificates
183219

184220
Configuration for trusted certificate persistence. Supports:
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{- if .Values.httproute.enabled }}
2+
{{- $fullName := include "homarr.fullname" . -}}
3+
{{- $svcPort := .Values.service.ports.app.port -}}
4+
apiVersion: gateway.networking.k8s.io/v1
5+
kind: HTTPRoute
6+
metadata:
7+
name: {{ $fullName }}
8+
labels:
9+
{{- include "homarr.labels" . | nindent 4 }}
10+
spec:
11+
parentRefs:
12+
{{- toYaml .Values.httproute.parentRefs | nindent 4 }}
13+
{{- if .Values.httproute.hostnames }}
14+
hostnames:
15+
{{- toYaml .Values.httproute.hostnames | nindent 4 }}
16+
{{- end }}
17+
rules:
18+
{{- range .Values.httproute.rules }}
19+
- matches:
20+
{{- if .matches }}
21+
{{- toYaml .matches | nindent 8 }}
22+
{{- else }}
23+
- path:
24+
type: PathPrefix
25+
value: /
26+
{{- end }}
27+
{{- if .filters }}
28+
filters:
29+
{{- toYaml .filters | nindent 8 }}
30+
{{- end }}
31+
backendRefs:
32+
{{- range .backendRefs }}
33+
- name: {{ .name | default $fullName }}
34+
port: {{ .port | default $svcPort }}
35+
{{- end }}
36+
{{- end }}
37+
{{- end }}

charts/homarr/values.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,39 @@ containerPorts:
178178
port: 7575
179179
protocol: TCP
180180

181+
# -- Gateway API HTTPRoute configuration
182+
httproute:
183+
# -- Enable HTTPRoute
184+
enabled: false
185+
186+
# -- References to the parent Gateway(s) this route attaches to.
187+
# Each item must include at least a `name`, and optionally a `namespace`.
188+
parentRefs:
189+
- name: my-gateway
190+
namespace: default
191+
192+
# -- Hostnames this route matches (similar to ingress.hosts.host)
193+
hostnames:
194+
- chart-example.local
195+
196+
# -- List of routing rules.
197+
# Each rule can include:
198+
# - matches: path/header/query matching
199+
# - filters: optional transformations (redirects, header modifications, etc.)
200+
# - backendRefs: one or more Kubernetes Services to forward traffic to
201+
rules:
202+
- matches:
203+
- path:
204+
# -- Path match type. One of: Exact, PathPrefix, RegularExpression
205+
type: PathPrefix
206+
# -- Path value to match
207+
value: /
208+
# -- Optional filters for this rule (default: empty)
209+
filters: []
210+
backendRefs:
211+
- name: homarr
212+
port: 8080
213+
181214
# Ingress configuration
182215
ingress:
183216
# -- Enable ingress

0 commit comments

Comments
 (0)