mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Merge pull request #87805 from zhouya0/add_kubectl_diff_exit_code_doc
Add kubectl diff exit code doc
This commit is contained in:
commit
e13463d755
@ -42,3 +42,17 @@ export KUBECTL_EXTERNAL_DIFF=meld; kubectl diff -k ./dir/
|
|||||||
|
|
||||||
{% endmethod %}
|
{% endmethod %}
|
||||||
|
|
||||||
|
{% method %}
|
||||||
|
## Exit status
|
||||||
|
The following exit values shall be returned:
|
||||||
|
|
||||||
|
`0`
|
||||||
|
No differences were found.
|
||||||
|
`1`
|
||||||
|
Differences were found.
|
||||||
|
`>1`
|
||||||
|
Kubectl or diff failed with an error.
|
||||||
|
|
||||||
|
**Note:** `KUBECTL_EXTERNAL_DIFF`, if used, is expected to follow that convention.
|
||||||
|
|
||||||
|
{% endmethod %}
|
@ -56,7 +56,18 @@ var (
|
|||||||
|
|
||||||
KUBECTL_EXTERNAL_DIFF environment variable can be used to select your own
|
KUBECTL_EXTERNAL_DIFF environment variable can be used to select your own
|
||||||
diff command. By default, the "diff" command available in your path will be
|
diff command. By default, the "diff" command available in your path will be
|
||||||
run with "-u" (unified diff) and "-N" (treat absent files as empty) options.`))
|
run with "-u" (unified diff) and "-N" (treat absent files as empty) options.
|
||||||
|
|
||||||
|
Exit status:
|
||||||
|
0
|
||||||
|
No differences were found.
|
||||||
|
1
|
||||||
|
Differences were found.
|
||||||
|
>1
|
||||||
|
Kubectl or diff failed with an error.
|
||||||
|
|
||||||
|
Note: KUBECTL_EXTERNAL_DIFF, if used, is expected to follow that convention.`))
|
||||||
|
|
||||||
diffExample = templates.Examples(i18n.T(`
|
diffExample = templates.Examples(i18n.T(`
|
||||||
# Diff resources included in pod.json.
|
# Diff resources included in pod.json.
|
||||||
kubectl diff -f pod.json
|
kubectl diff -f pod.json
|
||||||
|
Loading…
Reference in New Issue
Block a user