AAF OOM 2.1.20
[oom.git] / kubernetes / aaf / charts / aaf-sms / charts / aaf-sms-quorumclient / templates / statefulset.yaml
index 4a1ac52..1c6cc93 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright 2018 Intel Corporation, Inc
+# Modifications © 2020 AT&T
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -33,6 +34,22 @@ spec:
     spec:
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
+{{- if .Values.persistence.enabled }}
+      initContainers:
+        - name: fix-permission
+          command:
+            - /bin/sh
+          args:
+            - -c
+            - |
+              chmod -R 775 /quorumclient/auth
+              chown -R 100:1000 /quorumclient/auth
+          image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          volumeMounts:
+            - mountPath: /quorumclient/auth
+              name: {{ include "common.fullname" . }}-data
+{{- end }}
       containers:
       - image: "{{ include "common.repository" . }}/{{ .Values.image }}"
         name: {{ include "common.name" . }}