mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-25 12:01:04 +02:00
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
{{- if eq .Values.exposure.mode "gatewayApi" }}
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: {{ include "dograh.fullname" . }}-api
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "dograh.labels" . | nindent 4 }}
|
|
spec:
|
|
parentRefs:
|
|
{{- if .Values.exposure.gatewayApi.createGateway }}
|
|
- name: {{ include "dograh.fullname" . }}
|
|
{{- else }}
|
|
{{- range .Values.exposure.gatewayApi.parentRefs }}
|
|
- name: {{ .name }}
|
|
{{- if .namespace }}
|
|
namespace: {{ .namespace }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.exposure.gatewayApi.listenerHostname }}
|
|
hostnames:
|
|
- {{ .Values.exposure.gatewayApi.listenerHostname | quote }}
|
|
{{- end }}
|
|
rules:
|
|
- matches:
|
|
# /api/v1/ (not /api/) — /api/auth/* and /api/config/* are Next.js
|
|
# routes on the UI and must not be captured here.
|
|
- path:
|
|
type: PathPrefix
|
|
value: /api/v1/
|
|
backendRefs:
|
|
- name: {{ include "dograh.web.fullname" . }}
|
|
port: {{ .Values.web.service.port }}
|
|
{{- end }}
|