Created
April 30, 2020 07:33
-
-
Save xenolinux/d96b55d26141b047498cac606cc34094 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: ocs-osd-removal-{FAILED_OSD_ID} | |
# ocs-osd-removal-3 | |
namespace: openshift-storage | |
labels: | |
app: ceph-toolbox-job | |
spec: | |
template: | |
spec: | |
initContainers: | |
- name: config-init | |
image: travisn/ceph:toolbox-job | |
command: ["/usr/local/bin/toolbox.sh"] | |
args: ["--skip-watch"] | |
imagePullPolicy: IfNotPresent | |
env: | |
- name: ROOK_ADMIN_SECRET | |
valueFrom: | |
secretKeyRef: | |
name: rook-ceph-mon | |
key: admin-secret | |
volumeMounts: | |
- mountPath: /etc/ceph | |
name: ceph-config | |
- name: mon-endpoint-volume | |
mountPath: /etc/rook | |
containers: | |
- name: script | |
image: travisn/ceph:toolbox-job | |
volumeMounts: | |
- mountPath: /etc/ceph | |
name: ceph-config | |
readOnly: true | |
command: | |
- "bash" | |
- "-c" | |
- | | |
# ensure the osd is marked out | |
# ceph osd out osd.3 | |
ceph osd out osd.{FAILED_OSD_ID} | |
# purge the osd | |
# ceph osd purge osd.3 --force --yes-i-really-mean-it | |
ceph osd purge osd.{FAILED_OSD_ID} --force --yes-i-really-mean-it | |
volumes: | |
- name: mon-endpoint-volume | |
configMap: | |
name: rook-ceph-mon-endpoints | |
items: | |
- key: data | |
path: mon-endpoints | |
- name: ceph-config | |
emptyDir: {} | |
restartPolicy: Never |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment