k8wiz
Argo CD
Easy
CLI Usage

What exit code does argocd app diff return by default when it finds a difference?

Select your answer:

Show answer and explanation

Answer: 1

Explanation

argocd app diff returns 0 when there is no diff, 1 when it finds a diff and 2 on general errors, which makes it usable as a check in CI. The --diff-exit-code flag lets you choose another code, for example to tell a diff apart from the generic exit code 20 that CLI commands return on failure.

Read more about Argo CD