diff --git a/charts/homarr/Chart.yaml b/charts/homarr/Chart.yaml index 9fd03bb..fbb324c 100644 --- a/charts/homarr/Chart.yaml +++ b/charts/homarr/Chart.yaml @@ -3,7 +3,7 @@ name: homarr description: A Helm chart to deploy homarr for Kubernetes home: https://homarr-labs.github.io/charts/charts/homarr/ type: application -version: 5.13.0 +version: 6.0.0 # renovate datasource=docker depName=ghcr.io/homarr-labs/homarr appVersion: "v1.39.0" icon: https://raw.githubusercontent.com/homarr-labs/charts/refs/heads/main/charts/homarr/icon.svg @@ -26,8 +26,8 @@ annotations: fingerprint: 36F9A886ABA6AA4C1588B942E7EC1AA0EFD54840 url: https://homarr-labs.github.io/charts/pgp_keys.asc artifacthub.io/changes: |- - - kind: changed - description: Update ghcr.io/homarr-labs/homarr docker tag to v1.39.0 + - kind: added + description: add HttpRoute support artifacthub.io/links: |- - name: App Source url: https://github.com/homarr-labs/homarr diff --git a/charts/homarr/README.md b/charts/homarr/README.md index b75bc31..c9ab61e 100644 --- a/charts/homarr/README.md +++ b/charts/homarr/README.md @@ -2,7 +2,7 @@ homarr logo -![Version: 5.13.0](https://img.shields.io/badge/Version-5.13.0-informational?style=flat) +![Version: 6.0.0](https://img.shields.io/badge/Version-6.0.0-informational?style=flat) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) ![AppVersion: v1.39.0](https://img.shields.io/badge/AppVersion-v1.39.0-informational?style=flat) @@ -240,6 +240,42 @@ ingress: ```` +### HTTPRoute (Gateway API) + +The httproute section in the values.yaml file allows you to configure how external traffic accesses your application using the Kubernetes Gateway API. +This provides a more expressive and future-proof alternative to Ingress, with support for advanced routing, filters, and multiple parent Gateways. + +
+values.yaml + +````yaml +service: + enabled: true # must be enabled for HTTPRoute to forward traffic +httproute: + enabled: true + parentRefs: + - name: my-gateway + namespace: default + hostnames: + - homarr.homelab.dev + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: homarr + port: 8080 +```` +
+ +#### Notes: + +- parentRefs: the Gateway(s) this route attaches to. Gateways must already exist. +- hostnames: domain names this route applies to. +- rules: each rule can define matches (paths, headers, queries), optional filters, and backendRefs to services +- 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. + ### Certificates Configuration for trusted certificate persistence. Supports: @@ -386,6 +422,14 @@ All available values are listed on the [artifacthub](https://artifacthub.io/pack | envSecrets.dbCredentials.existingSecret | string | `"db-secret"` | Name of existing secret containing DB credentials | | fullnameOverride | string | `""` | Overrides chart's fullname | | 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" | +| 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 | +| httproute.enabled | bool | `false` | Enable HTTPRoute | +| httproute.hostnames | list | `["chart-example.local"]` | Hostnames this route matches (similar to ingress.hosts.host) | +| 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`. | +| 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 | +| httproute.rules[0].filters | list | `[]` | Optional filters for this rule (default: empty) | +| httproute.rules[0].matches[0].path.type | string | `"PathPrefix"` | Path match type. One of: Exact, PathPrefix, RegularExpression | +| httproute.rules[0].matches[0].path.value | string | `"/"` | Path value to match | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | image.repository | string | `"ghcr.io/homarr-labs/homarr"` | Image repository | | image.tag | string | `"v1.39.0"` | Overrides the image tag whose default is the chart appVersion | diff --git a/charts/homarr/README_CONFIG.md.gotmpl b/charts/homarr/README_CONFIG.md.gotmpl index 9048b46..0905e1c 100644 --- a/charts/homarr/README_CONFIG.md.gotmpl +++ b/charts/homarr/README_CONFIG.md.gotmpl @@ -179,6 +179,42 @@ ingress: ```` +### HTTPRoute (Gateway API) + +The httproute section in the values.yaml file allows you to configure how external traffic accesses your application using the Kubernetes Gateway API. +This provides a more expressive and future-proof alternative to Ingress, with support for advanced routing, filters, and multiple parent Gateways. + +
+values.yaml + +````yaml +service: + enabled: true # must be enabled for HTTPRoute to forward traffic +httproute: + enabled: true + parentRefs: + - name: my-gateway + namespace: default + hostnames: + - homarr.homelab.dev + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: homarr + port: 8080 +```` +
+ +#### Notes: + +- parentRefs: the Gateway(s) this route attaches to. Gateways must already exist. +- hostnames: domain names this route applies to. +- rules: each rule can define matches (paths, headers, queries), optional filters, and backendRefs to services +- 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. + ### Certificates Configuration for trusted certificate persistence. Supports: diff --git a/charts/homarr/templates/homarr-httproute.yaml b/charts/homarr/templates/homarr-httproute.yaml new file mode 100644 index 0000000..431a4e1 --- /dev/null +++ b/charts/homarr/templates/homarr-httproute.yaml @@ -0,0 +1,37 @@ +{{- if .Values.httproute.enabled }} +{{- $fullName := include "homarr.fullname" . -}} +{{- $svcPort := .Values.service.ports.app.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "homarr.labels" . | nindent 4 }} +spec: + parentRefs: + {{- toYaml .Values.httproute.parentRefs | nindent 4 }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- toYaml .Values.httproute.hostnames | nindent 4 }} + {{- end }} + rules: + {{- range .Values.httproute.rules }} + - matches: + {{- if .matches }} + {{- toYaml .matches | nindent 8 }} + {{- else }} + - path: + type: PathPrefix + value: / + {{- end }} + {{- if .filters }} + filters: + {{- toYaml .filters | nindent 8 }} + {{- end }} + backendRefs: + {{- range .backendRefs }} + - name: {{ .name | default $fullName }} + port: {{ .port | default $svcPort }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/homarr/values.yaml b/charts/homarr/values.yaml index 926b8be..1174805 100644 --- a/charts/homarr/values.yaml +++ b/charts/homarr/values.yaml @@ -178,6 +178,39 @@ containerPorts: port: 7575 protocol: TCP +# -- Gateway API HTTPRoute configuration +httproute: + # -- Enable HTTPRoute + enabled: false + + # -- References to the parent Gateway(s) this route attaches to. + # Each item must include at least a `name`, and optionally a `namespace`. + parentRefs: + - name: my-gateway + namespace: default + + # -- Hostnames this route matches (similar to ingress.hosts.host) + hostnames: + - chart-example.local + + # -- 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 + rules: + - matches: + - path: + # -- Path match type. One of: Exact, PathPrefix, RegularExpression + type: PathPrefix + # -- Path value to match + value: / + # -- Optional filters for this rule (default: empty) + filters: [] + backendRefs: + - name: homarr + port: 8080 + # Ingress configuration ingress: # -- Enable ingress