k8s-platform/charts/pgadmin/templates/httproute.yaml
2026-06-16 00:03:01 +00:00

33 lines
940 B
YAML

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ .Values.route.name }}
namespace: {{ .Values.namespace }}
spec:
parentRefs:
- name: {{ .Values.route.gatewayName }}
namespace: {{ .Values.route.gatewayNamespace }}
hostnames:
{{- range .Values.route.hostnames }}
- {{ . | quote }}
{{- end }}
rules:
- matches:
- path:
type: Exact
value: {{ .Values.route.basePath | quote }}
filters:
- type: RequestRedirect
requestRedirect:
path:
type: ReplaceFullPath
replaceFullPath: {{ printf "%s/" .Values.route.basePath | quote }}
statusCode: 301
- matches:
- path:
type: PathPrefix
value: {{ printf "%s/" .Values.route.basePath | quote }}
backendRefs:
- name: {{ .Values.route.serviceName }}
port: {{ .Values.route.servicePort }}