theshire/kubernetes/tools/wiperook.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

111 lines
2.4 KiB
YAML

---
apiVersion: v1
kind: Pod
metadata:
name: disk-wipe-sam
namespace: kube-system
spec:
restartPolicy: Never
nodeName: sam
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-frodo
namespace: kube-system
spec:
restartPolicy: Never
nodeName: frodo
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-bilbo
namespace: kube-system
spec:
restartPolicy: Never
nodeName: bilbo
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