Files
charts/bitnami/kubeapps/templates/dashboard-deployment.yaml
2019-11-21 16:10:52 +00:00

73 lines
2.8 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "kubeapps.dashboard.fullname" . }}
labels:
app: {{ template "kubeapps.dashboard.fullname" . }}
chart: {{ template "kubeapps.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.dashboard.replicaCount }}
selector:
matchLabels:
app: {{ template "kubeapps.dashboard.fullname" . }}
release: {{ .Release.Name }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/dashboard-config.yaml") . | sha256sum }}
labels:
app: {{ template "kubeapps.dashboard.fullname" . }}
release: {{ .Release.Name }}
spec:
{{- include "kubeapps.imagePullSecrets" . | indent 6 }}
{{- if .Values.dashboard.affinity }}
affinity: {{- include "kubeapps.tplValue" (dict "value" .Values.dashboard.affinity "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.dashboard.nodeSelector }}
nodeSelector: {{- include "kubeapps.tplValue" (dict "value" .Values.dashboard.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.dashboard.tolerations }}
tolerations: {{- include "kubeapps.tplValue" (dict "value" .Values.dashboard.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
containers:
- name: dashboard
image: {{ template "kubeapps.image" (list .Values.dashboard.image .Values.global) }}
{{- if .Values.dashboard.livenessProbe }}
livenessProbe: {{- toYaml .Values.dashboard.livenessProbe | nindent 12 }}
{{- end }}
{{- if .Values.dashboard.readinessProbe }}
readinessProbe: {{- toYaml .Values.dashboard.readinessProbe | nindent 12 }}
{{- end }}
volumeMounts:
- name: vhost
mountPath: /opt/bitnami/nginx/conf/server_blocks
- name: config
mountPath: /app/config.json
subPath: config.json
ports:
- name: http
containerPort: 8080
{{- if .Values.dashboard.resources }}
resources: {{- toYaml .Values.dashboard.resources | nindent 12 }}
{{- end }}
volumes:
- name: vhost
configMap:
name: {{ template "kubeapps.dashboard-config.fullname" . }}
items:
- key: vhost.conf
path: vhost.conf
- name: config
configMap:
name: {{ template "kubeapps.dashboard-config.fullname" . }}
items:
- key: config.json
path: config.json