Fix ingress (#109)

This commit is contained in:
Yann Soubeyrand 2019-09-20 01:02:55 +02:00 committed by Alex Collins
parent aff8a78040
commit f8dc826d58
2 changed files with 6 additions and 16 deletions

View file

@ -1,6 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- $servicePortHttps := .Values.server.servicePortHttps -}}
{{- $host := regexReplaceAll "^https?://([^/]+)(/.*)?$" .Values.config.url "${1}" }}
{{- $path := default "/" (regexReplaceAll "^https?://([^/]+)(/.*)?$" .Values.config.url "${2}") }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@ -17,22 +17,13 @@ metadata:
{{- end }}
spec:
rules:
{{- with .Values.config.url }}
{{- range prepend .Values.ingress.additionalHosts $host }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
- path: {{ $path | quote }}
backend:
serviceName: argocd-server
servicePort: {{ $servicePortHttps }}
{{- end }}
{{- range .Values.ingress.additionalHosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: argocd-server
servicePort: {{ $servicePortHttps }}
servicePort: https
{{- end }}
{{- end }}