From 5e3ee55f4b7ad8d74da4f3c0abaffe712353a7b7 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Sun, 31 Mar 2024 10:02:31 -0500 Subject: [PATCH] Update --- kubernetes/tools/wipeone.yaml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 kubernetes/tools/wipeone.yaml diff --git a/kubernetes/tools/wipeone.yaml b/kubernetes/tools/wipeone.yaml new file mode 100644 index 00000000..c0c20d8f --- /dev/null +++ b/kubernetes/tools/wipeone.yaml @@ -0,0 +1,37 @@ +--- +apiVersion: v1 +kind: Pod +metadata: + name: disk-wipe-one + namespace: rook-ceph +spec: + restartPolicy: Never + nodeName: talos-ltk-p4a + containers: + - name: disk-wipe + image: ghcr.io/onedr0p/alpine:3.19.1@sha256:3fbc581cb0fe29830376161ae026e2a765dcc11e1747477fe9ebf155720b8638 + securityContext: + privileged: true + resources: {} + env: + - name: CEPH_DISK + value: "/dev/xvdb" + 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 +