When using a pipe in shell commands (|) it is critical that the pipefail option is used, otherwise the second command in the pipeline silently overwrites any errors from the first command.
Argo CD will then treat the stdout output as valid (even if it is empty), which can have catastrophic effects: deleting all resources belonging to the Application/ApplicationSet.
Description
When using a pipe in shell commands (
|
) it is critical that the pipefail option is used, otherwise the second command in the pipeline silently overwrites any errors from the first command. Argo CD will then treat thestdout
output as valid (even if it is empty), which can have catastrophic effects: deleting all resources belonging to the Application/ApplicationSet.Several users have already been hit by this: https://github.com/argoproj-labs/argocd-vault-plugin/issues/533
Therefore I believe it is very important that the correct commands are shown in the documentation.
Fixes: https://github.com/argoproj-labs/argocd-vault-plugin/issues/533
Checklist
Please make sure that your PR fulfills the following requirements:
go mod tidy -compat=1.21
to ensure only the minimum is pulled in.Type of Change