Merge "Updated dependencies"
[nonrtric.git] / test / simulator-group / pvc-cleaner / pvc-cleaner.yaml
index 790ee87..91ed603 100644 (file)
@@ -3,13 +3,18 @@ kind: Pod
 metadata:
   name: pvc-cleaner
   namespace: $PVC_CLEANER_NAMESPACE
+  labels:
+    run: $PVC_CLEANER_APP_NAME
+    autotest: PVCCLEANER
 spec:
   restartPolicy: Never
   containers:
   - name: pvc-cleaner
-    image: "ubuntu:20.10"
+    image: $PVC_CLEANER_IMAGE
+    securityContext:
+      runAsUser: 0
     command: ["/bin/sh","-c"]
-    args: ["rm -rf $PVC_CLEANER_RM_PATH/*"]
+    args: ["rm -rf $PVC_CLEANER_RM_PATH/* ; if [ $? -ne 0 ]; then echo 'Delete failure: '$PVC_CLEANER_RM_PATH; else echo 'Delete OK: '$PVC_CLEANER_RM_PATH; fi"]
     volumeMounts:
     - mountPath: $PVC_CLEANER_RM_PATH
       name: pvc-cleaner-m-vol