This repository has been archived on 2025-01-11. You can view files and clone it, but cannot push or open issues or pull requests.
theshire/kubernetes/tools/wiperook.yaml

99 lines
2.3 KiB
YAML

---
apiVersion: v1
kind: Pod
metadata:
name: disk-wipe-pippin
namespace: kube-system
spec:
restartPolicy: Never
nodeName: pippin
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
---
apiVersion: v1
kind: Pod
metadata:
name: disk-wipe-merry
namespace: kube-system
spec:
restartPolicy: Never
nodeName: merry
containers:
- name: disk-wipe
image: docker.io/library/alpine:latest
securityContext:
privileged: true
resources: {}
env:
- name: CEPH_DISK
value: "/dev/nvme1n1"
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-rosie
namespace: kube-system
spec:
restartPolicy: Never
nodeName: rosie
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