diff --git a/deploy/helm/templates/httproute.yaml b/deploy/helm/templates/httproute.yaml new file mode 100644 index 0000000..805e4bf --- /dev/null +++ b/deploy/helm/templates/httproute.yaml @@ -0,0 +1,35 @@ +{{- if .Values.route.enabled -}} +apiVersion: {{ .Values.route.apiVersion}} +kind: {{ .Values.route.kind}} +metadata: + name: {{ template "postgresus.fullname" . }} + annotations: {{ toYaml .Values.route.annotations | nindent 4 }} + labels: + app.kubernetes.io/component: "app" + {{- include "postgresus.labels" . | nindent 4 }} +spec: + {{- with .Values.route.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.route.hostnames }} + hostnames: + {{- toYaml . | nindent 4 }} + {{- end }} + rules: + - backendRefs: + - name: {{ template "postgresus.fullname" . }}-service + port: {{ .Values.service.port }} + {{- with .Values.route.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.route.matches }} + matches: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.route.timeouts }} + timeouts: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} \ No newline at end of file diff --git a/deploy/helm/values.yaml b/deploy/helm/values.yaml index 4cbcc62..968de8d 100644 --- a/deploy/helm/values.yaml +++ b/deploy/helm/values.yaml @@ -55,6 +55,19 @@ ingress: pathType: Prefix tls: [] +# HTTPRoute configuration for Gateway API +route: + enabled: false + apiVersion: gateway.networking.k8s.io/v1 + kind: HTTPRoute + annotations: {} + hostnames: + - postgresus.example.com + parentRefs: [] + filters: [] + matches: [] + timeouts: {} + # Health checks configuration # Note: The application only has /api/v1/system/health endpoint livenessProbe: