From 3a42f593d57292d1e9ddd0c2955f7b0a6b09c38b Mon Sep 17 00:00:00 2001 From: William Howell Date: Tue, 24 Feb 2026 01:01:36 +1300 Subject: [PATCH] chore(helm): Add GatewayAPI route support to helm chart (#2544) Co-authored-by: Ludovic Ortega --- charts/seerr-chart/Chart.yaml | 2 +- charts/seerr-chart/README.md | 14 ++++++- charts/seerr-chart/templates/route.yaml | 50 +++++++++++++++++++++++++ charts/seerr-chart/values.yaml | 38 +++++++++++++++++++ 4 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 charts/seerr-chart/templates/route.yaml diff --git a/charts/seerr-chart/Chart.yaml b/charts/seerr-chart/Chart.yaml index 23635889..2b531ae1 100644 --- a/charts/seerr-chart/Chart.yaml +++ b/charts/seerr-chart/Chart.yaml @@ -3,7 +3,7 @@ kubeVersion: '>=1.23.0-0' name: seerr-chart description: Seerr helm chart for Kubernetes type: application -version: 3.1.0 +version: 3.2.0 # renovate: image=ghcr.io/seerr-team/seerr appVersion: 'v3.0.1' maintainers: diff --git a/charts/seerr-chart/README.md b/charts/seerr-chart/README.md index 49e965e8..9b0546ee 100644 --- a/charts/seerr-chart/README.md +++ b/charts/seerr-chart/README.md @@ -1,6 +1,6 @@ # seerr-chart -![Version: 3.1.0](https://img.shields.io/badge/Version-3.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.0.1](https://img.shields.io/badge/AppVersion-v3.0.1-informational?style=flat-square) +![Version: 3.2.0](https://img.shields.io/badge/Version-3.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.0.1](https://img.shields.io/badge/AppVersion-v3.0.1-informational?style=flat-square) Seerr helm chart for Kubernetes @@ -77,6 +77,18 @@ If `replicaCount` value was used - remove it. Helm update should work fine after | probes.readinessProbe | object | `{}` | Configure readiness probe | | probes.startupProbe | string | `nil` | Configure startup probe | | resources | object | `{}` | | +| route.main.additionalRules | list | `[]` | | +| route.main.annotations | object | `{}` | | +| route.main.apiVersion | string | `"gateway.networking.k8s.io/v1"` | Set the route apiVersion, e.g. gateway.networking.k8s.io/v1 or gateway.networking.k8s.io/v1alpha2 | +| route.main.enabled | bool | `false` | Enables or disables the Gateway API route | +| route.main.filters | list | `[]` | | +| route.main.hostnames | list | `[]` | | +| route.main.httpsRedirect | bool | `false` | To redirect to HTTPS, create a new route object under the main route and enable this option. This should only be used with HTTP-like routes, such as HTTPRoute or GRPCRoute. [Reference]( https://gateway-api.sigs.k8s.io/guides/http-redirect-rewrite/ ) | +| route.main.kind | string | `"HTTPRoute"` | Set the route kind. Note that experimental kinds require changing `apiVersion` | +| route.main.labels | object | `{}` | | +| route.main.matches[0].path.type | string | `"PathPrefix"` | | +| route.main.matches[0].path.value | string | `"/"` | | +| route.main.parentRefs | list | `[]` | | | securityContext.allowPrivilegeEscalation | bool | `false` | | | securityContext.capabilities.drop[0] | string | `"ALL"` | | | securityContext.privileged | bool | `false` | | diff --git a/charts/seerr-chart/templates/route.yaml b/charts/seerr-chart/templates/route.yaml new file mode 100644 index 00000000..a7fd0ed6 --- /dev/null +++ b/charts/seerr-chart/templates/route.yaml @@ -0,0 +1,50 @@ +{{- range $name, $route := .Values.route }} +{{- if $route.enabled }} +--- +apiVersion: {{ $route.apiVersion | default "gateway.networking.k8s.io/v1" }} +kind: {{ $route.kind | default "HTTPRoute" }} +metadata: + name: {{ template "seerr.fullname" $ }}{{ if ne $name "main" }}-{{ $name }}{{ end }} + labels: + {{- include "seerr.labels" $ | nindent 4 }} + {{- with $route.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with $route.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with $route.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with $route.hostnames }} + hostnames: + {{- tpl (toYaml .) $ | nindent 4 }} + {{- end }} + rules: + {{- with $route.additionalRules }} + {{- tpl (toYaml .) $ | nindent 4 }} + {{- end }} + {{- if $route.httpsRedirect }} + - filters: + - type: RequestRedirect + requestRedirect: + scheme: https + statusCode: 301 + {{- else }} + - backendRefs: + - name: {{ include "seerr.fullname" $ }} + port: {{ $.Values.service.port }} + {{- with $route.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with $route.matches }} + matches: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/seerr-chart/values.yaml b/charts/seerr-chart/values.yaml index 6da7cf45..40378b6a 100644 --- a/charts/seerr-chart/values.yaml +++ b/charts/seerr-chart/values.yaml @@ -105,6 +105,44 @@ ingress: # hosts: # - chart-example.local +route: + main: + # -- Enables or disables the Gateway API route + enabled: false + + # -- Set the route apiVersion, e.g. gateway.networking.k8s.io/v1 or gateway.networking.k8s.io/v1alpha2 + apiVersion: gateway.networking.k8s.io/v1 + + # -- Set the route kind. + # Note that experimental kinds require changing `apiVersion` + kind: HTTPRoute + + annotations: {} + + labels: {} + + parentRefs: [] + # - name: my-gateway + # namespace: gateway + # sectionName: https + + hostnames: [] + # - seerr.example.com + + additionalRules: [] + + filters: [] + + matches: + - path: + type: PathPrefix + value: / + + # -- To redirect to HTTPS, create a new route object under the main route and enable this option. + # This should only be used with HTTP-like routes, such as HTTPRoute or GRPCRoute. + # [Reference]( https://gateway-api.sigs.k8s.io/guides/http-redirect-rewrite/ ) + httpsRedirect: false + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little