Skip to content

Commit

Permalink
fix command run at preStop event
Browse files Browse the repository at this point in the history
Add /host to directories in rm command because it is not run in chroot
environment.

Fixes: #24
Signed-off-by: Jens Freimann <jfreimann@redhat.com>
  • Loading branch information
jensfr committed Nov 4, 2020
1 parent 386abd1 commit 8607ac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/openshift_controller.go
Expand Up @@ -164,7 +164,7 @@ func (r *KataConfigOpenShiftReconciler) processDaemonsetForCR(operation DaemonOp
Lifecycle: &corev1.Lifecycle{
PreStop: &corev1.Handler{
Exec: &corev1.ExecAction{
Command: []string{"rm", "-rf", "/opt/kata-install", "/usr/local/kata/"},
Command: []string{"/bin/sh", "-c", "rm -rf /host/opt/kata-install /host/usr/local/kata/"},
},
},
},
Expand Down

0 comments on commit 8607ac3

Please sign in to comment.