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

@ -1,4 +1,4 @@
apiVersion: v1
description: A Helm chart for Kubernetes
name: argo
version: 0.2.0
version: 0.2.1

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:

View file

@ -37,11 +37,38 @@ ui:
name: ui
# Enables ability to SSH into pod using web UI
enableWebConsole: false
serviceType: LoadBalancer
serviceType: ClusterIP
servicePort: 80
serviceAccount: argo-ui
# Annotations to be applied to the UI Service
serviceAnnotations: {}
## Ingress configuration.
## ref: https://kubernetes.io/docs/user-guide/ingress/
##
ingress:
enabled: false
## Annotations to be added to the web ingress.
##
# annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
## Hostnames.
## Must be provided if Ingress is enabled.
##
# hosts:
# - argo.domain.com
## TLS configuration.
## Secrets must be manually created in the namespace.
##
# tls:
# - secretName: argo-ui-tls
# hosts:
# - argo.domain.com
# Influences the creation of the ConfigMap for the workflow-controller itself.
useDefaultArtifactRepo: false
useStaticCredentials: true