Modify hook docs for clarity on displaying hook execution results (#7679)

Signed-off-by: allenxu404 <qix2@vmware.com>
pull/7701/head
Qi Xu 2024-04-17 12:07:04 +08:00 committed by GitHub
parent bc29471ed6
commit 498a239e5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1 @@
Modify hook docs for clarity on displaying hook execution results

View File

@ -102,6 +102,22 @@ pre:
Note that the container must support the shell command you use.
## Backup Hook Execution Results
### Viewing Results
Velero records the execution results of hooks, allowing users to obtain this information by running the following command:
```bash
$ velero backup describe <backup name>
```
The displayed results include the number of hooks that were attempted to be executed and the number of hooks that failed execution. Any detailed failure reasons will be present in `Errors` section if applicable.
```bash
HooksAttempted: 1
HooksFailed: 0
```
[1]: api-types/backup.md
[2]: https://github.com/vmware-tanzu/velero/blob/main/examples/nginx-app/with-pv.yaml

View File

@ -280,4 +280,21 @@ postHooks:
Note that the container must support the shell command you use.
## Restore Hook Execution Results
### Viewing Results
Velero records the execution results of hooks, allowing users to obtain this information by running the following command:
```bash
$ velero restore describe <restore name>
```
The displayed results include the number of hooks that were attempted to be executed and the number of hooks that failed execution. Any detailed failure reasons will be present in `Errors` section if applicable.
```bash
HooksAttempted: 1
HooksFailed: 0
```
[1]: api-types/restore.md