theshire/kubernetes/tools/wipeone.yaml
Joseph Hanson d9ff973a55
moving to the shire
Expanding from 1 node to 6 + 2 VMs with GPUs
2024-09-04 13:35:14 -05:00

36 lines
816 B
YAML

---
apiVersion: v1
kind: Pod
metadata:
name: disk-wipe-one
namespace: kube-system
spec:
restartPolicy: Never
nodeName: gandalf-01
containers:
- name: disk-wipe
image: docker.io/library/alpine:latest
securityContext:
privileged: true
resources: {}
env:
- name: CEPH_DISK
value: "/dev/nvme0n1"
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=1000 oflag=direct of=$CEPH_DISK;
partprobe $CEPH_DISK;
volumeMounts:
- mountPath: /mnt/host_var
name: host-var
volumes:
- name: host-var
hostPath:
path: /var