argoproj-labs / argocd-vault-plugin

An Argo CD plugin to retrieve secrets from Secret Management tools and inject them into Kubernetes secrets
https://argocd-vault-plugin.readthedocs.io
Apache License 2.0
812 stars 190 forks source link

docs: use pipefail option in shell commands to prevent accidental deletions #597

Open jacksgt opened 8 months ago

jacksgt commented 8 months ago

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 the stdout 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:

Type of Change