2026-01-14 21:45:05 +00:00
|
|
|
{{- if .Values.httpRoute.enabled -}}
|
|
|
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
|
|
|
kind: HTTPRoute
|
|
|
|
|
metadata:
|
2026-02-18 06:48:01 +01:00
|
|
|
name: {{ include "chart.fullname" . }}
|
2026-01-14 21:45:05 +00:00
|
|
|
labels:
|
|
|
|
|
{{- include "chart.labels" . | nindent 4 }}
|
|
|
|
|
{{- with .Values.httpRoute.annotations }}
|
|
|
|
|
annotations:
|
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
spec:
|
|
|
|
|
parentRefs:
|
2026-02-02 21:21:53 +00:00
|
|
|
{{- if .Values.httpRoute.parentRefs }}
|
2026-01-14 21:45:05 +00:00
|
|
|
{{- range $ref := .Values.httpRoute.parentRefs }}
|
2026-02-18 06:48:01 +01:00
|
|
|
- name: {{ $.Values.gateway.name | default $ref.name | quote }}
|
|
|
|
|
namespace: {{ $ref.namespace | default (default .Release.Namespace .Values.gateway.namespace) | quote }}
|
|
|
|
|
sectionName: {{ $ref.sectionName | default "http" | quote }}
|
2026-01-14 21:45:05 +00:00
|
|
|
{{- with $ref.kind }}
|
|
|
|
|
kind: {{ . | quote }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- with $ref.group }}
|
|
|
|
|
group: {{ . | quote }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end }}
|
2026-02-02 21:21:53 +00:00
|
|
|
{{- else }}
|
|
|
|
|
# Default parentRef when parentRefs is empty or not set
|
2026-02-18 06:48:01 +01:00
|
|
|
- name: {{ .Values.gateway.name | default (printf "%s-gateway" (include "chart.fullName" .)) | quote }}
|
|
|
|
|
namespace: {{ default .Release.Namespace .Values.gateway.namespace | quote }}
|
2026-02-02 21:21:53 +00:00
|
|
|
sectionName: "http"
|
|
|
|
|
{{- end }}
|
2026-01-14 21:45:05 +00:00
|
|
|
{{- with .Values.httpRoute.hostnames }}
|
|
|
|
|
hostnames:
|
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
rules:
|
|
|
|
|
{{- range .Values.httpRoute.rules }}
|
2026-02-02 21:21:53 +00:00
|
|
|
- {{- with .matches }}
|
|
|
|
|
matches:
|
2026-01-14 21:45:05 +00:00
|
|
|
{{- toYaml . | nindent 8 }}
|
2026-02-02 21:21:53 +00:00
|
|
|
{{- end }}
|
|
|
|
|
{{- with .filters }}
|
2026-01-14 21:45:05 +00:00
|
|
|
filters:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
2026-02-02 21:21:53 +00:00
|
|
|
{{- end }}
|
2026-01-14 21:45:05 +00:00
|
|
|
backendRefs:
|
2026-02-18 06:48:01 +01:00
|
|
|
- name: {{ include "chart.fullname" }}
|
|
|
|
|
port: {{ $.Values.service.port }}
|
2026-01-14 21:45:05 +00:00
|
|
|
weight: 1
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end }}
|