diff --git a/charts/argo/templates/ui-cluster-role.yaml b/charts/argo/templates/ui-cluster-role.yaml index f95d945d..2e3c975e 100644 --- a/charts/argo/templates/ui-cluster-role.yaml +++ b/charts/argo/templates/ui-cluster-role.yaml @@ -1,3 +1,4 @@ +{{- if .Values.ui.enabled -}} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -27,3 +28,4 @@ rules: - get - list - watch + {{- end -}} diff --git a/charts/argo/templates/ui-crb.yaml b/charts/argo/templates/ui-crb.yaml index f27e73df..9b7089f5 100644 --- a/charts/argo/templates/ui-crb.yaml +++ b/charts/argo/templates/ui-crb.yaml @@ -1,3 +1,4 @@ +{{- if .Values.ui.enabled -}} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -10,3 +11,4 @@ subjects: - kind: ServiceAccount name: {{ .Values.ui.serviceAccount }} namespace: {{ .Release.Namespace }} +{{- end -}} diff --git a/charts/argo/templates/ui-deployment.yaml b/charts/argo/templates/ui-deployment.yaml index 0d7154b0..8790a277 100644 --- a/charts/argo/templates/ui-deployment.yaml +++ b/charts/argo/templates/ui-deployment.yaml @@ -1,3 +1,4 @@ +{{- if .Values.ui.enabled -}} apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -30,3 +31,4 @@ spec: fieldPath: metadata.namespace - name: BASE_HREF value: / +{{- end -}} diff --git a/charts/argo/templates/ui-ingress.yaml b/charts/argo/templates/ui-ingress.yaml index d931f8f2..590d763b 100644 --- a/charts/argo/templates/ui-ingress.yaml +++ b/charts/argo/templates/ui-ingress.yaml @@ -1,3 +1,4 @@ +{{- if .Values.ui.enabled -}} {{- if .Values.ui.ingress.enabled -}} {{- $serviceName := printf "%s-%s" .Release.Name .Values.ui.name -}} {{- $servicePort := .Values.ui.servicePort -}} @@ -28,3 +29,4 @@ spec: {{ toYaml .Values.ui.ingress.tls | indent 4 }} {{- end -}} {{- end -}} +{{- end -}} diff --git a/charts/argo/templates/ui-sa.yaml b/charts/argo/templates/ui-sa.yaml index 77f322ee..eebd359c 100644 --- a/charts/argo/templates/ui-sa.yaml +++ b/charts/argo/templates/ui-sa.yaml @@ -1,5 +1,6 @@ +{{- if .Values.ui.enabled -}} apiVersion: v1 kind: ServiceAccount metadata: name: {{ .Values.ui.serviceAccount }} - +{{- end -}} diff --git a/charts/argo/templates/ui-service.yaml b/charts/argo/templates/ui-service.yaml index 56cead02..3a63613d 100644 --- a/charts/argo/templates/ui-service.yaml +++ b/charts/argo/templates/ui-service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.ui.enabled -}} apiVersion: v1 kind: Service metadata: @@ -21,3 +22,4 @@ spec: {{- if and (eq .Values.ui.serviceType "LoadBalancer") .Values.ui.loadBalancerSourceRanges }} loadBalancerSourceRanges: {{ toYaml .Values.ui.loadBalancerSourceRanges | indent 4 }}{{- end }} +{{- end -}} diff --git a/charts/argo/values.yaml b/charts/argo/values.yaml index 5836cd69..09faee2f 100644 --- a/charts/argo/values.yaml +++ b/charts/argo/values.yaml @@ -36,6 +36,7 @@ controller: globallevel: "0" ui: + enabled: true # optional map of annotations to be applied to the ui Pods podAnnotations: {} name: ui