91ed603a8d96a08597ac15b221c4f283c1f1f0e0
[nonrtric.git] / test / simulator-group / pvc-cleaner / pvc-cleaner.yaml
1 apiVersion: v1
2 kind: Pod
3 metadata:
4   name: pvc-cleaner
5   namespace: $PVC_CLEANER_NAMESPACE
6   labels:
7     run: $PVC_CLEANER_APP_NAME
8     autotest: PVCCLEANER
9 spec:
10   restartPolicy: Never
11   containers:
12   - name: pvc-cleaner
13     image: $PVC_CLEANER_IMAGE
14     securityContext:
15       runAsUser: 0
16     command: ["/bin/sh","-c"]
17     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"]
18     volumeMounts:
19     - mountPath: $PVC_CLEANER_RM_PATH
20       name: pvc-cleaner-m-vol
21   volumes:
22   - name: pvc-cleaner-m-vol
23     persistentVolumeClaim:
24       claimName: $PVC_CLEANER_CLAIMNAME