From be962f4bab75b3d62c25579516063b6e2c49edbd Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Wed, 20 Dec 2023 07:52:11 -0600 Subject: [PATCH] Add wipe-rook tool. --- kubernetes/tools/wipe-rook-fast.yaml | 108 +++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 kubernetes/tools/wipe-rook-fast.yaml diff --git a/kubernetes/tools/wipe-rook-fast.yaml b/kubernetes/tools/wipe-rook-fast.yaml new file mode 100644 index 0000000..93b8c65 --- /dev/null +++ b/kubernetes/tools/wipe-rook-fast.yaml @@ -0,0 +1,108 @@ +--- +apiVersion: v1 +kind: Pod +metadata: + name: disk-wipe-nessa +spec: + restartPolicy: Never + nodeName: nessa + containers: + - name: disk-wipe + image: ghcr.io/onedr0p/alpine:3.18.4@sha256:b0b6f6f42bf9649ccaf0e98cd74d5e123471e2c4a4db4a5ee417b18dde9973a9 + 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 + +--- +apiVersion: v1 +kind: Pod +metadata: + name: disk-wipe-nienna +spec: + restartPolicy: Never + nodeName: nienna + containers: + - name: disk-wipe + image: ghcr.io/onedr0p/alpine:3.18.4@sha256:b0b6f6f42bf9649ccaf0e98cd74d5e123471e2c4a4db4a5ee417b18dde9973a9 + 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 + +--- +apiVersion: v1 +kind: Pod +metadata: + name: disk-wipe-orome +spec: + restartPolicy: Never + nodeName: orome + containers: + - name: disk-wipe + image: ghcr.io/onedr0p/alpine:3.18.4@sha256:b0b6f6f42bf9649ccaf0e98cd74d5e123471e2c4a4db4a5ee417b18dde9973a9 + 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