Add ingress for argo-ui (#18)

* Fix bug in ui-crb.yaml and add ingress for argo-ui
* Use crd.version value and add ability to specify crd creation job sa
This commit is contained in:
Ilya Sotkov 2018-08-28 01:29:10 +03:00 committed by Jesse Suen
parent 61d426c1ca
commit 2320338591
5 changed files with 63 additions and 5 deletions

View file

@ -9,4 +9,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ .Values.ui.serviceAccount }}
namespace: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}

View file

@ -0,0 +1,31 @@
{{- if .Values.ui.ingress.enabled -}}
{{- $serviceName := printf "%s-%s" .Release.Name .Values.ui.name -}}
{{- $servicePort := .Values.ui.servicePort -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Values.ui.name }}
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
namspace: {{ .Release.Namespace }}
annotations:
{{- range $key, $value := .Values.ui.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
{{- range .Values.ui.ingress.hosts }}
- host: {{ . }}
http:
paths:
- backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end -}}
{{- if .Values.ui.ingress.tls }}
tls:
{{ toYaml .Values.ui.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}

View file

@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-{{ .Values.ui.name}}
name: {{ .Release.Name }}-{{ .Values.ui.name }}
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
@ -12,7 +12,7 @@ metadata:
{{ toYaml .Values.ui.serviceAnnotations | indent 4}}{{- end }}
spec:
ports:
- port: 80
- port: {{ .Values.ui.servicePort }}
protocol: TCP
targetPort: 8001
selector: