Allow disabling ui and deploying ui related resources

This commit is contained in:
kasia 2019-01-30 11:57:42 -08:00
parent 969a59ead2
commit 2a02d37c2e
7 changed files with 13 additions and 1 deletions

View file

@ -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 -}}

View file

@ -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 -}}

View file

@ -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 -}}

View file

@ -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 -}}

View file

@ -1,5 +1,6 @@
{{- if .Values.ui.enabled -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.ui.serviceAccount }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if .Values.ui.enabled -}}
apiVersion: v1
kind: Service
metadata:
@ -18,3 +19,4 @@ spec:
app: {{ .Release.Name }}-{{ .Values.ui.name }}
sessionAffinity: None
type: {{ .Values.ui.serviceType }}
{{- end -}}

View file

@ -32,6 +32,7 @@ controller:
globallevel: "0"
ui:
enabled: true
# optional map of annotations to be applied to the ui Pods
podAnnotations: {}
name: ui