Skip to content

Commit 98b9b40

Browse files
committed
feat: add Gateway API HTTPRoute support
Add optional HTTPRoute resource for Gateway API integration as an alternative to traditional Ingress. Configurable via httpRoute.enabled, httpRoute.parentRefs, and httpRoute.hostnames values. Signed-off-by: Yann Ponzoni <[email protected]>
1 parent 735d2fb commit 98b9b40

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{{- if .Values.httpRoute.enabled -}}
2+
---
3+
apiVersion: gateway.networking.k8s.io/v1
4+
kind: HTTPRoute
5+
metadata:
6+
name: {{ include "pms-chart.fullname" . }}
7+
labels: {{ include "pms-chart.labels" . | nindent 4 }}
8+
{{- with .Values.httpRoute.annotations }}
9+
annotations: {{ toYaml . | nindent 4 }}
10+
{{- end }}
11+
12+
spec:
13+
{{- with .Values.httpRoute.parentRefs }}
14+
parentRefs: {{ toYaml . | nindent 4 }}
15+
{{- end }}
16+
{{- with .Values.httpRoute.hostnames }}
17+
hostnames: {{ toYaml . | nindent 4 }}
18+
{{- end }}
19+
rules:
20+
- matches:
21+
- path:
22+
type: PathPrefix
23+
value: /
24+
backendRefs:
25+
- name: {{ include "pms-chart.fullname" . }}
26+
port: {{ .Values.service.port }}
27+
{{- end -}}

charts/plex-media-server/values.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,25 @@ ingress:
4444
# -- Custom annotations to put on the ingress resource
4545
annotations: {}
4646

47+
httpRoute:
48+
# -- Specify if an HTTPRoute resource for the pms server should be created or not
49+
enabled: false
50+
51+
# -- Gateway API parent references (required when enabled)
52+
# @default -- `[]`
53+
parentRefs: []
54+
# - name: my-gateway
55+
# namespace: gateway-namespace
56+
# sectionName: https
57+
58+
# -- Hostnames to match for the HTTPRoute
59+
# @default -- `[]`
60+
hostnames: []
61+
# - plex.example.com
62+
63+
# -- Custom annotations to put on the HTTPRoute resource
64+
annotations: {}
65+
4766
pms:
4867
# -- The storage class to use when provisioning the pms config volume
4968
# this needs to be created manually, null will use the default

0 commit comments

Comments
 (0)