add pod deletion
This commit is contained in:
parent
c1b3abafe5
commit
bbf5cd65aa
1 changed files with 75 additions and 0 deletions
75
rook-ceph/delete-pod.yaml
Normal file
75
rook-ceph/delete-pod.yaml
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: rook-ceph-purge-osd-SETTHEOSDIDHERE
|
||||
namespace: rook-ceph # namespace:cluster
|
||||
labels:
|
||||
app: rook-ceph-purge-osd-SETTHEOSDIDHERE
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: rook-ceph-purge-osd-SETTHEOSDIDHERE
|
||||
spec:
|
||||
serviceAccountName: rook-ceph-purge-osd
|
||||
containers:
|
||||
- name: osd-removal
|
||||
image: rook/ceph:master
|
||||
# TODO: Insert the OSD ID in the last parameter that is to be removed
|
||||
# The OSD IDs are a comma-separated list. For example: "0" or "0,2".
|
||||
# If you want to preserve the OSD PVCs, set `--preserve-pvc true`.
|
||||
#
|
||||
# A --force-osd-removal option is available if the OSD should be destroyed even though the
|
||||
# removal could lead to data loss.
|
||||
args:
|
||||
- "ceph"
|
||||
- "osd"
|
||||
- "remove"
|
||||
- "--preserve-pvc"
|
||||
- "false"
|
||||
- "--force-osd-removal"
|
||||
- "false"
|
||||
- "--osd-ids"
|
||||
- "SETTHEOSDIDHERE"
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: ROOK_MON_ENDPOINTS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: data
|
||||
name: rook-ceph-mon-endpoints
|
||||
- name: ROOK_CEPH_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: ceph-username
|
||||
name: rook-ceph-mon
|
||||
- name: ROOK_CEPH_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: ceph-secret
|
||||
name: rook-ceph-mon
|
||||
- name: ROOK_CONFIG_DIR
|
||||
value: /var/lib/rook
|
||||
- name: ROOK_CEPH_CONFIG_OVERRIDE
|
||||
value: /etc/rook/config/override.conf
|
||||
- name: ROOK_FSID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: fsid
|
||||
name: rook-ceph-mon
|
||||
- name: ROOK_LOG_LEVEL
|
||||
value: DEBUG
|
||||
volumeMounts:
|
||||
- mountPath: /etc/ceph
|
||||
name: ceph-conf-emptydir
|
||||
- mountPath: /var/lib/rook
|
||||
name: rook-config
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: ceph-conf-emptydir
|
||||
- emptyDir: {}
|
||||
name: rook-config
|
||||
restartPolicy: Never
|
||||
Loading…
Add table
Add a link
Reference in a new issue