From bd3e558c2495cb2451a1e01ea20d80c19e862fce Mon Sep 17 00:00:00 2001 From: parth-gr Date: Tue, 14 Dec 2021 18:24:41 +0530 Subject: [PATCH 1/2] build: updating tini init command in direct mount toolbox the tini have been removed but was still present at direct mount used the bin/bash shell in place of tini Closes: https://github.com/rook/rook/issues/9382 Signed-off-by: parth-gr --- deploy/examples/direct-mount.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy/examples/direct-mount.yaml b/deploy/examples/direct-mount.yaml index ad0af7779ef8..7a5b4ccd9ded 100644 --- a/deploy/examples/direct-mount.yaml +++ b/deploy/examples/direct-mount.yaml @@ -19,9 +19,10 @@ spec: containers: - name: rook-direct-mount image: rook/ceph:master - command: ["/tini"] - args: ["-g", "--", "/usr/local/bin/toolbox.sh"] + command: ["/bin/bash"] + args: ["-m", "-c", "/usr/local/bin/toolbox.sh"] imagePullPolicy: IfNotPresent + tty: true env: - name: ROOK_CEPH_USERNAME valueFrom: From bc355c695e35efab4442daaa50fac806e2f17c35 Mon Sep 17 00:00:00 2001 From: parth-gr Date: Tue, 14 Dec 2021 19:37:27 +0530 Subject: [PATCH 2/2] build: update the securityContext of direct mount container update securityContext to runAsUser: 0 so container can run as a root user Signed-off-by: parth-gr --- deploy/examples/direct-mount.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy/examples/direct-mount.yaml b/deploy/examples/direct-mount.yaml index 7a5b4ccd9ded..34fe5a54252f 100644 --- a/deploy/examples/direct-mount.yaml +++ b/deploy/examples/direct-mount.yaml @@ -36,6 +36,7 @@ spec: key: ceph-secret securityContext: privileged: true + runAsUser: 0 volumeMounts: - mountPath: /dev name: dev