theshire/.taskfiles/volsync/resources/wipe.tmpl.yaml

27 lines
634 B
YAML
Raw Permalink Normal View History

2024-01-11 15:03:54 -06:00
---
apiVersion: batch/v1
kind: Job
metadata:
2024-07-08 10:53:12 -05:00
name: ${job}
namespace: ${ns}
2024-01-11 15:03:54 -06:00
spec:
ttlSecondsAfterFinished: 3600
template:
spec:
automountServiceAccountToken: false
restartPolicy: OnFailure
containers:
2024-07-08 10:53:12 -05:00
- name: main
image: docker.io/library/alpine:latest
2024-01-11 15:03:54 -06:00
command: ["/bin/sh", "-c", "cd /config; find . -delete"]
volumeMounts:
- name: config
mountPath: /config
securityContext:
privileged: true
2024-07-08 10:53:12 -05:00
resources: {}
2024-01-11 15:03:54 -06:00
volumes:
- name: config
persistentVolumeClaim:
2024-07-08 10:53:12 -05:00
claimName: ${claim}