Files
bentopdf/chart/templates/httproute.yaml

52 lines
1.6 KiB
YAML
Raw Normal View History

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