Files
movienight-backend/deploy/helm/movienight/templates/gateway/httproute.yaml
T

30 lines
941 B
YAML

{{- if and .Values.routes.enabled .Values.gateway.enabled }}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ include "movienight.fullname" . }}
labels:
{{- include "movienight.componentLabels" (dict "root" . "component" "route") | nindent 4 }}
{{- with .Values.global.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
- name: {{ include "movienight.gatewayName" . }}
{{- if .Values.gateway.hostnames }}
hostnames:
{{- toYaml .Values.gateway.hostnames | nindent 4 }}
{{- end }}
rules:
{{- if and .Values.routes.backend.enabled .Values.backend.enabled }}
- matches:
- path:
type: PathPrefix
value: {{ .Values.routes.backend.pathPrefix | quote }}
backendRefs:
- name: {{ include "movienight.fullname" . }}-backend
port: {{ .Values.backend.service.port }}
{{- end }}
{{- end }}