53 lines
1.8 KiB
YAML
53 lines
1.8 KiB
YAML
{{- if .Values.applicationSet.httproute.enabled -}}
|
|
{{- $fullName := include "argo-cd.applicationSet.fullname" . -}}
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: {{ $fullName }}
|
|
namespace: {{ include "argo-cd.namespace" . }}
|
|
labels:
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
|
|
{{- with .Values.applicationSet.httproute.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- with .Values.applicationSet.httproute.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
parentRefs:
|
|
{{- if .Values.applicationSet.httproute.parentRefs }}
|
|
{{- toYaml .Values.applicationSet.httproute.parentRefs | nindent 4 }}
|
|
{{- else if .Values.applicationSet.listenerset.enabled }}
|
|
- group: gateway.networking.k8s.io
|
|
kind: ListenerSet
|
|
name: {{ $fullName }}
|
|
namespace: {{ include "argo-cd.namespace" . }}
|
|
sectionName: {{ .Values.applicationSet.listenerset.listenerName }}
|
|
{{- end }}
|
|
{{- if .Values.applicationSet.httproute.hostnames }}
|
|
hostnames:
|
|
{{- toYaml .Values.applicationSet.httproute.hostnames | nindent 4 }}
|
|
{{- else if .Values.applicationSet.listenerset.enabled }}
|
|
hostnames:
|
|
- {{ tpl (.Values.applicationSet.listenerset.hostname | default .Values.global.domain) $ | quote }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range .Values.applicationSet.httproute.rules }}
|
|
{{- with .matches }}
|
|
- matches:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .filters }}
|
|
filters:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
backendRefs:
|
|
- group: ''
|
|
kind: Service
|
|
name: {{ $fullName }}
|
|
port: {{ $.Values.applicationSet.service.port }}
|
|
weight: 1
|
|
{{- end }}
|
|
{{- end }}
|