diff options
author | Jack Lucas <jflucas@research.att.com> | 2020-03-30 15:56:46 -0400 |
---|---|---|
committer | Jack Lucas <jflucas@research.att.com> | 2020-03-31 16:07:24 -0400 |
commit | 8d8c9b9333a8a00f16d74684e74632334198cb25 (patch) | |
tree | ea0baf0c8e98ca7123f5c55a792baca3265911ec /kubernetes/dcaemod/components/dcaemod-genprocessor/templates | |
parent | ddd1de41d3cc17ad53048bad2c81e2fc1757a5ea (diff) |
Update MOD component versions
Use images that do not run as root
Issue-ID: DCAEGEN2-2170
Signed-off-by: Jack Lucas <jflucas@research.att.com>
Change-Id: I5766128c6005ba0087f8eb469e74386c4c9f310b
Diffstat (limited to 'kubernetes/dcaemod/components/dcaemod-genprocessor/templates')
-rw-r--r-- | kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml | 15 |
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 }}" |