{{- if .Values.server.httproute.enabled -}} {{- $fullName := include "argo-cd.server.fullname" . -}} {{- $insecure := index .Values.configs.params "server.insecure" | toString -}} {{- $servicePort := eq $insecure "true" | ternary .Values.server.service.servicePortHttp .Values.server.service.servicePortHttps -}} 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.server.name "name" .Values.server.name) | nindent 4 }} {{- with .Values.server.httproute.labels }} {{- toYaml . | nindent 4 }} {{- end }} {{- with .Values.server.httproute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: parentRefs: {{- with .Values.server.httproute.parentRefs }} {{- toYaml . | nindent 4 }} {{- end }} {{- with .Values.server.httproute.hostnames }} hostnames: {{- toYaml . | nindent 4 }} {{- end }} rules: {{- range .Values.server.httproute.rules }} {{- with .matches }} - matches: {{- toYaml . | nindent 8 }} {{- end }} {{- with .filters }} filters: {{- toYaml . | nindent 8 }} {{- end }} backendRefs: - name: {{ $fullName }} port: {{ $servicePort }} weight: 1 {{- end }} {{- end }}