Allow disabling ui and deploying ui related resources (#31)

This commit is contained in:
kbial 2019-04-16 18:00:06 -07:00 committed by Alex Collins
parent c14d052fd7
commit 1205770646
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 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole
metadata: metadata:
@ -27,3 +28,4 @@ rules:
- get - get
- list - list
- watch - watch
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if .Values.ui.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding kind: ClusterRoleBinding
metadata: metadata:
@ -10,3 +11,4 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: {{ .Values.ui.serviceAccount }} name: {{ .Values.ui.serviceAccount }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if .Values.ui.enabled -}}
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -30,3 +31,4 @@ spec:
fieldPath: metadata.namespace fieldPath: metadata.namespace
- name: BASE_HREF - name: BASE_HREF
value: / value: /
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if .Values.ui.enabled -}}
{{- if .Values.ui.ingress.enabled -}} {{- if .Values.ui.ingress.enabled -}}
{{- $serviceName := printf "%s-%s" .Release.Name .Values.ui.name -}} {{- $serviceName := printf "%s-%s" .Release.Name .Values.ui.name -}}
{{- $servicePort := .Values.ui.servicePort -}} {{- $servicePort := .Values.ui.servicePort -}}
@ -28,3 +29,4 @@ spec:
{{ toYaml .Values.ui.ingress.tls | indent 4 }} {{ toYaml .Values.ui.ingress.tls | indent 4 }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- end -}}

View file

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

View file

@ -1,3 +1,4 @@
{{- if .Values.ui.enabled -}}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -21,3 +22,4 @@ spec:
{{- if and (eq .Values.ui.serviceType "LoadBalancer") .Values.ui.loadBalancerSourceRanges }} {{- if and (eq .Values.ui.serviceType "LoadBalancer") .Values.ui.loadBalancerSourceRanges }}
loadBalancerSourceRanges: loadBalancerSourceRanges:
{{ toYaml .Values.ui.loadBalancerSourceRanges | indent 4 }}{{- end }} {{ toYaml .Values.ui.loadBalancerSourceRanges | indent 4 }}{{- end }}
{{- end -}}

View file

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