chore(helm): Add GatewayAPI route support to helm chart (#2544)
Co-authored-by: Ludovic Ortega <github@mail.adminafk.fr>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# seerr-chart
|
||||
|
||||
  
|
||||
  
|
||||
|
||||
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` | |
|
||||
|
||||
50
charts/seerr-chart/templates/route.yaml
Normal file
50
charts/seerr-chart/templates/route.yaml
Normal file
@@ -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 }}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user