summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/templates/statefulset.yaml
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dtimoney@att.com>2019-05-07 13:32:42 -0400
committerTimoney, Dan (dt5972) <dtimoney@att.com>2019-05-08 15:11:11 -0400
commitba4d2eba0ecea6195031f6c778cb1d2735057449 (patch)
tree0e4d6088b97954a3eed978daab6ddef14ca140c5 /kubernetes/sdnc/templates/statefulset.yaml
parent63bdb0f9106b2412af636f3be11d94904e12dd2d (diff)
Change ownership of persistent vol mount
Persistent volumes must be writable by non-root user odl. So, change ownership of the mount to odl user. Change-Id: Ie2ff285bd623a7b69289bc438ff16a2724fd7ded Issue-ID: SDNC-749 Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Diffstat (limited to 'kubernetes/sdnc/templates/statefulset.yaml')
-rw-r--r--kubernetes/sdnc/templates/statefulset.yaml10
1 files changed, 9 insertions, 1 deletions
diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml
index 9728fab524..d60319fa1c 100644
--- a/kubernetes/sdnc/templates/statefulset.yaml
+++ b/kubernetes/sdnc/templates/statefulset.yaml
@@ -46,7 +46,15 @@ spec:
fieldPath: metadata.namespace
image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- name: {{ include "common.name" . }}-readiness
+ name: {{ include "common.name" . }}-readiness
+ - name: {{ include "common.name" . }}-chown
+ image: "busybox"
+ command: ["sh", "-c", "chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }} ; chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certpersistence.certPath }}"]
+ volumeMounts:
+ - mountPath: {{ .Values.persistence.mdsalPath }}
+ name: {{ include "common.fullname" . }}-mdsal
+ - mountPath: {{ .Values.certpersistence.certPath }}
+ name: {{ include "common.fullname" . }}-certs
containers:
- name: {{ include "common.name" . }}
image: "{{ include "common.repository" . }}/{{ .Values.image }}"