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

100 lines
2.3 KiB
YAML
Raw Permalink Normal View History

2024-02-16 14:28:14 -06:00
---
apiVersion: v1
kind: Pod
metadata:
2025-01-01 00:06:33 -06:00
name: disk-wipe-pippin
2024-03-31 10:02:07 -05:00
namespace: kube-system
2024-02-16 14:28:14 -06:00
spec:
restartPolicy: Never
2025-01-01 00:06:33 -06:00
nodeName: pippin
2024-02-16 14:28:14 -06:00
containers:
- name: disk-wipe
image: docker.io/library/alpine:latest
2024-02-16 14:28:14 -06:00
securityContext:
privileged: true
resources: {}
env:
- name: CEPH_DISK
value: "/dev/nvme0n1"
2025-01-01 00:06:33 -06:00
command: ["/bin/sh", "-c"]
2024-02-16 14:28:14 -06:00
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:
2025-01-01 00:06:33 -06:00
name: disk-wipe-merry
2024-03-31 10:02:07 -05:00
namespace: kube-system
2024-02-16 14:28:14 -06:00
spec:
restartPolicy: Never
2025-01-01 00:06:33 -06:00
nodeName: merry
2024-02-16 14:28:14 -06:00
containers:
- name: disk-wipe
image: docker.io/library/alpine:latest
2024-02-16 14:28:14 -06:00
securityContext:
privileged: true
resources: {}
env:
- name: CEPH_DISK
2025-01-01 00:06:33 -06:00
value: "/dev/nvme1n1"
command: ["/bin/sh", "-c"]
2024-02-16 14:28:14 -06:00
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:
2025-01-01 00:06:33 -06:00
name: disk-wipe-rosie
2024-03-31 10:02:07 -05:00
namespace: kube-system
2024-02-16 14:28:14 -06:00
spec:
restartPolicy: Never
2025-01-01 00:06:33 -06:00
nodeName: rosie
2024-02-16 14:28:14 -06:00
containers:
- name: disk-wipe
image: docker.io/library/alpine:latest
2024-02-16 14:28:14 -06:00
securityContext:
privileged: true
resources: {}
env:
- name: CEPH_DISK
2024-03-31 10:02:07 -05:00
value: "/dev/nvme0n1"
2024-02-16 14:28:14 -06:00
2025-01-01 00:06:33 -06:00
command: ["/bin/sh", "-c"]
2024-02-16 14:28:14 -06:00
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