diff --git a/charts/argo/Chart.yaml b/charts/argo/Chart.yaml index 0616b08c..324cd011 100644 --- a/charts/argo/Chart.yaml +++ b/charts/argo/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 description: A Helm chart for Kubernetes name: argo -version: 0.2.0 +version: 0.2.1 diff --git a/charts/argo/templates/ui-crb.yaml b/charts/argo/templates/ui-crb.yaml index daa1f302..f27e73df 100644 --- a/charts/argo/templates/ui-crb.yaml +++ b/charts/argo/templates/ui-crb.yaml @@ -9,4 +9,4 @@ roleRef: subjects: - kind: ServiceAccount name: {{ .Values.ui.serviceAccount }} - namespace: {{ .Release.Name }} + namespace: {{ .Release.Namespace }} diff --git a/charts/argo/templates/ui-ingress.yaml b/charts/argo/templates/ui-ingress.yaml new file mode 100644 index 00000000..39dfab75 --- /dev/null +++ b/charts/argo/templates/ui-ingress.yaml @@ -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 -}} diff --git a/charts/argo/templates/ui-service.yaml b/charts/argo/templates/ui-service.yaml index fd6c40c6..23983209 100644 --- a/charts/argo/templates/ui-service.yaml +++ b/charts/argo/templates/ui-service.yaml @@ -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: diff --git a/charts/argo/values.yaml b/charts/argo/values.yaml index 7ce97984..abd9c628 100644 --- a/charts/argo/values.yaml +++ b/charts/argo/values.yaml @@ -37,10 +37,37 @@ 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