theshire/.archive/.taskfiles/rook/WipeDiskJob.tmpl.yaml

27 lines
727 B
YAML
Raw Permalink Normal View History

2024-01-11 15:03:54 -06:00
---
apiVersion: batch/v1
kind: Job
metadata:
name: "${jobName}"
namespace: "default"
spec:
ttlSecondsAfterFinished: 3600
template:
spec:
automountServiceAccountToken: false
restartPolicy: Never
nodeName: ${node}
containers:
- name: disk-wipe
2024-05-28 08:04:34 -05:00
image: docker.io/library/alpine:3.20.0
2024-01-11 15:03:54 -06:00
securityContext:
privileged: true
resources: {}
command: ["/bin/sh", "-c"]
args:
- apk add --no-cache sgdisk util-linux parted;
sgdisk --zap-all ${ceph_disk};
blkdiscard ${ceph_disk};
dd if=/dev/zero bs=1M count=10000 oflag=direct of=${ceph_disk};
partprobe ${ceph_disk};