Merge "[COMMON] Add monitoring to postgres"
[oom.git] / kubernetes / portal / components / portal-mariadb / templates / deployment.yaml
index 250335f..469a0b5 100644 (file)
@@ -38,14 +38,14 @@ spec:
     spec:
       initContainers:
       - name: volume-permissions
-        image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
+        image: {{ include "repositoryGenerator.image.busybox" . }}
         command: ['sh', '-c', 'chmod -R 777 /var/lib/mysql']
         volumeMounts:
         - mountPath: /var/lib/mysql
           name: mariadb-data
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
@@ -92,8 +92,7 @@ spec:
           - mountPath: /usr/local/bin/docker-entrypoint.sh
             subPath: docker-entrypoint.sh
             name: docker-entry
-          resources:
-{{ include "common.resources" . | indent 12 }}
+          resources: {{ include "common.resources" . | nindent 12 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
@@ -102,6 +101,7 @@ spec:
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
       {{- if .Values.persistence.enabled }}
         - name: mariadb-data