argocd-helm/charts/argo-cd/templates/argocd-server-ingress.yaml
2019-09-23 14:58:42 -07:00

33 lines
1 KiB
YAML

{{- if .Values.ingress.enabled -}}
{{- $host := regexReplaceAll "^https?://([^/]+)(/.*)?$" .Values.config.url "${1}" }}
{{- $path := default "/" (regexReplaceAll "^https?://([^/]+)(/.*)?$" .Values.config.url "${2}") }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: argocd-server
labels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}
helm.sh/chart: {{ include "argo-cd.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/part-of: {{ include "argo-cd.name" . }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
rules:
{{- range prepend .Values.ingress.additionalHosts $host }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $path | quote }}
backend:
serviceName: argocd-server
servicePort: https
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end }}