From dbe0346294cf6e6e70758cc35701d68c1bfda122 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 (cherry picked from commit bd3e558c2495cb2451a1e01ea20d80c19e862fce) # Conflicts: # deploy/examples/direct-mount.yaml --- deploy/examples/direct-mount.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deploy/examples/direct-mount.yaml b/deploy/examples/direct-mount.yaml index a586995102c9..d5041b2d8703 100644 --- a/deploy/examples/direct-mount.yaml +++ b/deploy/examples/direct-mount.yaml @@ -18,10 +18,17 @@ spec: dnsPolicy: ClusterFirstWithHostNet containers: - name: rook-direct-mount +<<<<<<< HEAD image: rook/ceph:v1.8.0 command: ["/tini"] args: ["-g", "--", "/usr/local/bin/toolbox.sh"] +======= + image: rook/ceph:master + command: ["/bin/bash"] + args: ["-m", "-c", "/usr/local/bin/toolbox.sh"] +>>>>>>> bd3e558c2 (build: updating tini init command in direct mount toolbox) imagePullPolicy: IfNotPresent + tty: true env: - name: ROOK_CEPH_USERNAME valueFrom: From 2a891a8eef4877d71465debff6f8226b5a890c7f 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 (cherry picked from commit bc355c695e35efab4442daaa50fac806e2f17c35) --- deploy/examples/direct-mount.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/deploy/examples/direct-mount.yaml b/deploy/examples/direct-mount.yaml index d5041b2d8703..964f2531be25 100644 --- a/deploy/examples/direct-mount.yaml +++ b/deploy/examples/direct-mount.yaml @@ -18,15 +18,9 @@ spec: dnsPolicy: ClusterFirstWithHostNet containers: - name: rook-direct-mount -<<<<<<< HEAD image: rook/ceph:v1.8.0 - command: ["/tini"] - args: ["-g", "--", "/usr/local/bin/toolbox.sh"] -======= - image: rook/ceph:master command: ["/bin/bash"] args: ["-m", "-c", "/usr/local/bin/toolbox.sh"] ->>>>>>> bd3e558c2 (build: updating tini init command in direct mount toolbox) imagePullPolicy: IfNotPresent tty: true env: @@ -42,6 +36,7 @@ spec: key: ceph-secret securityContext: privileged: true + runAsUser: 0 volumeMounts: - mountPath: /dev name: dev