Fix bug 1704 - Adding non-root user to run LCM
Change-Id: I871b4e73136206b39b8d4d4f32c2ee457797de0c
Signed-off-by: sousaedu <eduardo.sousa@canonical.com>
diff --git a/installers/docker/osm_pods/lcm.yaml b/installers/docker/osm_pods/lcm.yaml
index 2628408..5f34c0d 100644
--- a/installers/docker/osm_pods/lcm.yaml
+++ b/installers/docker/osm_pods/lcm.yaml
@@ -30,6 +30,10 @@
labels:
app: lcm
spec:
+ securityContext:
+ runAsUser: 1000
+ runAsGroup: 1000
+ fsGroup: 1000
initContainers:
- name: kafka-ro-mongo-test
image: alpine:latest
@@ -54,16 +58,4 @@
value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
envFrom:
- secretRef:
- name: lcm-secret
- volumeMounts:
- - name: osm-packages
- mountPath: /app/storage
- - name: prometheus-config
- mountPath: /etc/prometheus
- volumes:
- - name: osm-packages
- hostPath:
- path: /var/lib/osm/osm_osm_packages/_data
- - name: prometheus-config
- hostPath:
- path: /var/lib/osm/prometheus
+ name: lcm-secret