summaryrefslogtreecommitdiffstats
path: root/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-04-02 14:40:36 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-02 14:40:36 +0000
commitdd729d6d6e0f688a539fa66cb0e1497339403dc6 (patch)
tree75e580ee311d3ee6a7cc8f3e97d26a6a6e7d4a88 /kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml
parentb85fba094ef38191e9105d56f68e958fd6d4cafd (diff)
parent8d8c9b9333a8a00f16d74684e74632334198cb25 (diff)
Merge "Update MOD component versions"
Diffstat (limited to 'kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml')
-rw-r--r--kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml15
1 files changed, 15 insertions, 0 deletions
diff --git a/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml
index 6b15abe909..a4afe05c95 100644
--- a/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml
+++ b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml
@@ -24,6 +24,21 @@ spec:
template:
metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
+ initContainers:
+ # apps run as uid 1000, gid 1000
+ # the volume is mounted with root permissions
+ # this initContainer changes ownership to uid 1000 gid 1000
+ # (tried using a securityContext in the pod spec, but it didn't seem to work)
+ - name: set-permissions
+ image: busybox:latest
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ command:
+ - sh
+ - -c
+ - chown -R 1000:1000 /genprocessor-data
+ volumeMounts:
+ - mountPath: /genprocessor-data
+ name: genprocessor-data
containers:
- name: {{ include "common.name" . }}
image: "{{ include "common.repository" . }}/{{ .Values.image }}"