Skip to content

Commit

Permalink
Merge pull request #123 from topolvm/doc-update-user-manual
Browse files Browse the repository at this point in the history
doc: fix "Stop the pie" user manual to remove finalizers for probe Pods
  • Loading branch information
llamerada-jp committed May 9, 2024
2 parents b552af6 + 1cb76dc commit 7c722db
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/user-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,26 @@ To stop the pie, follow these steps:
$ NAMESPACE=<Set the namespace of the pie.>
$ kubectl -n ${NAMESPACE} scale deployments --replicas=0 pie
```
2. Wait for Pods to stop.
2. Wait for the controller Pod to stop.
```console
$ watch kubectl -n ${NAMESPACE} get pods
```
3. Delete CronJobs (if exists).
```console
$ CRONJOBS_LIST=$(kubectl -n ${NAMESPACE} get cronjobs --no-headers=true | awk '{print $1}')
$ CRONJOBS_LIST=$(kubectl -n ${NAMESPACE} get cronjobs --no-headers=true | grep -E '^pie-probe-|^provision-probe-|^mount-probe-' | awk '{print $1}')
$ [ -n "${CRONJOBS_LIST}" ] && kubectl -n ${NAMESPACE} delete cronjobs ${CRONJOBS_LIST}
```
4. Remove the pie's finalizers for the Pods.
```console
$ PODs=$(kubectl get pod -n ${NAMESPACE} -o json | jq -r '.items[] | .metadata.name' | grep -E '^pie-probe-|^provision-probe-|^mount-probe-')
$ for POD in ${PODs}; do
kubectl patch pod -n ${NAMESPACE} ${POD} --type='json' -p='[{"op": "remove", "path": "/metadata/finalizers"}]'
$ done
```
5. Wait for all the probe Pods to stop.
```console
$ watch kubectl -n ${NAMESPACE} get pods
```

### Start the pie

Expand Down

0 comments on commit 7c722db

Please sign in to comment.