2024-03-31 10:02:31 -05:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
|
|
name: disk-wipe-one
|
2024-05-07 13:31:53 -05:00
|
|
|
namespace: kube-system
|
2024-03-31 10:02:31 -05:00
|
|
|
spec:
|
|
|
|
restartPolicy: Never
|
2024-09-04 13:35:14 -05:00
|
|
|
nodeName: gandalf-01
|
2024-03-31 10:02:31 -05:00
|
|
|
containers:
|
|
|
|
- name: disk-wipe
|
2024-09-04 13:35:14 -05:00
|
|
|
image: docker.io/library/alpine:latest
|
2024-03-31 10:02:31 -05:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
resources: {}
|
|
|
|
env:
|
|
|
|
- name: CEPH_DISK
|
2024-09-04 13:35:14 -05:00
|
|
|
value: "/dev/nvme0n1"
|
2024-03-31 10:02:31 -05:00
|
|
|
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
|