File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -337,3 +337,23 @@ spec:
337
337
annotations:
338
338
checksum/secret: <path:secrets/data/db#certs | sha256sum>
339
339
` ` `
340
+
341
+ # ## Error Handling
342
+
343
+ # ### Detecting errors in chained commands
344
+
345
+ By default argocd-vault-plugin will read valid kubernetes YAMLs and replace variables with values from Vault.
346
+ If a previous command failed and outputs nothing to stdout and AVP reads the input from stdin with
347
+ the `-` argument, AVP will forward an empty YAML output downstream. To catch and prevent accientental errors
348
+ in chained commands, please use the `-o pipefail` bash option like so :
349
+
350
+ ` ` ` bash
351
+ $ sh -c '((>&2 echo "some error" && exit 1) | argocd-vault-plugin generate - | kubectl diff -f -); echo $?;'
352
+ some error
353
+ 0
354
+
355
+ $ set -o pipefail
356
+ $ sh -c '((>&2 echo "some error" && exit 1) | argocd-vault-plugin generate - | kubectl diff -f -); echo $?;'
357
+ some error
358
+ 1
359
+ ` ` `
You can’t perform that action at this time.
0 commit comments