Skip to content

Commit 35498d8

Browse files
committed
adding support for httperoutes
1 parent 77ae8d1 commit 35498d8

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{{- if .Values.route.enabled -}}
2+
apiVersion: {{ .Values.route.apiVersion}}
3+
kind: {{ .Values.route.kind}}
4+
metadata:
5+
name: {{ template "postgresus.fullname" . }}
6+
annotations: {{ toYaml .Values.route.annotations | nindent 4 }}
7+
labels:
8+
app.kubernetes.io/component: "app"
9+
{{- include "postgresus.labels" . | nindent 4 }}
10+
spec:
11+
{{- with .Values.route.parentRefs }}
12+
parentRefs:
13+
{{- toYaml . | nindent 4 }}
14+
{{- end }}
15+
{{- with .Values.route.hostnames }}
16+
hostnames:
17+
{{- toYaml . | nindent 4 }}
18+
{{- end }}
19+
rules:
20+
- backendRefs:
21+
- name: {{ template "postgresus.fullname" . }}-service
22+
port: {{ .Values.service.port }}
23+
{{- with .Values.route.filters }}
24+
filters:
25+
{{- toYaml . | nindent 8 }}
26+
{{- end }}
27+
{{- with .Values.route.matches }}
28+
matches:
29+
{{- toYaml . | nindent 8 }}
30+
{{- end }}
31+
{{- with .Values.route.timeouts }}
32+
timeouts:
33+
{{- toYaml . | nindent 8 }}
34+
{{- end }}
35+
{{- end }}

deploy/helm/values.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ ingress:
5555
pathType: Prefix
5656
tls: []
5757

58+
# HTTPRoute configuration for Gateway API
59+
route:
60+
enabled: false
61+
apiVersion: gateway.networking.k8s.io/v1
62+
kind: HTTPRoute
63+
annotations: {}
64+
hostnames:
65+
- postgresus.example.com
66+
parentRefs: []
67+
filters: []
68+
matches: []
69+
timeouts: {}
70+
5871
# Health checks configuration
5972
# Note: The application only has /api/v1/system/health endpoint
6073
livenessProbe:

0 commit comments

Comments
 (0)