Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix "Stop the pie" user manual to remove finalizers for probe Pods #123

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
peng225 marked this conversation as resolved.
Show resolved Hide resolved
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}
llamerada-jp marked this conversation as resolved.
Show resolved Hide resolved
```
4. Remove the pie's finalizers for the Pods.
peng225 marked this conversation as resolved.
Show resolved Hide resolved
```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