From ec2aa2b8338ecd7b7fcf31d40b4aa23dfa2f55cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Thu, 4 Mar 2021 08:49:43 +0100 Subject: [PATCH] HELM_SECRETS_QUIET=true if ArgoCD is detected (#83) --- CHANGELOG.md | 3 +++ README.md | 8 ++++++-- scripts/run.sh | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d882ad14..01874b19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ Allow override sops version on installation ## [Unreleased] +### Added +- Detect ArgoCD environment by `ARGOCD_APP_NAME` environment variable and set `HELM_SECRETS_QUIET=true` by default. (https://github.com/jkroepke/helm-secrets/pull/83) + ## [3.5.0] - 2021-02-20 ### Added diff --git a/README.md b/README.md index 36b00229..0a341b49 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ In meanwhile, this project is officially listed on the [community projects side] Wraps the whole helm command. Slow on multiple value files. -``` +```bash helm secrets upgrade name . -f secrets.yaml ``` @@ -30,7 +30,7 @@ helm secrets upgrade name . -f secrets.yaml Run decrypted command on specific value files. Useful if you plan to use the helm terraform provider. -``` +```bash helm upgrade name . -f secrets://secrets.yaml ``` @@ -219,6 +219,10 @@ If you are using sops (used by default) you have some additional features: An additional documentation, resources and examples can be found [here](USAGE.md). +### ArgoCD support + +helm-secrets could detect an ArgoCD environment by the `ARGOCD_APP_NAME` environment variable. If detected, `HELM_SECRETS_QUIET` is set to `true`. + ## Moving parts of project - [`scripts/install.sh`](scripts/install.sh) - Script used as the hook to download and install sops and install git diff configuration for helm-secrets files. diff --git a/scripts/run.sh b/scripts/run.sh index 3ecc7c26..56a684c4 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -2,6 +2,10 @@ set -euf +if [ -n "${ARGOCD_APP_NAME+x}" ]; then + HELM_SECRETS_QUIET="${HELM_SECRETS_QUIET:-true}" +fi + # Path to current directory SCRIPT_DIR="$(dirname "$0")"