From 9b32c84639d08c73e127fbf4a0ee94592cecdc3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20B=C3=A4hler?= Date: Thu, 25 Jan 2024 08:19:45 +0100 Subject: [PATCH] fix: correct skip decryption (#106) --- argocd-cmp/cmp.yaml | 1 - pkg/config/config.go | 1 - subst/cmd/render.go | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/argocd-cmp/cmp.yaml b/argocd-cmp/cmp.yaml index 2732cc0..31824eb 100644 --- a/argocd-cmp/cmp.yaml +++ b/argocd-cmp/cmp.yaml @@ -17,6 +17,5 @@ spec: - "." - --env-regex - "^ARGOCD_ENV_.*$" - - --must-decrypt - --kubeconfig - "/etc/kubernetes/kubeconfig" \ No newline at end of file diff --git a/pkg/config/config.go b/pkg/config/config.go index c7a241f..30dae23 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -22,7 +22,6 @@ type Configuration struct { SecretNamespace string `mapstructure:"secret-namespace"` EjsonKey []string `mapstructure:"ejson-key"` SkipDecrypt bool `mapstructure:"skip-decrypt"` - MustDecrypt bool `mapstructure:"must-decrypt"` KubectlTimeout time.Duration `mapstructure:"kubectl-timeout"` Kubeconfig string `mapstructure:"kubeconfig"` KubeAPI string `mapstructure:"kube-api"` diff --git a/subst/cmd/render.go b/subst/cmd/render.go index f967727..4e6e5b7 100644 --- a/subst/cmd/render.go +++ b/subst/cmd/render.go @@ -48,8 +48,8 @@ func addRenderFlags(flags *flag.FlagSet) { flags.StringSlice("ejson-key", []string{}, heredoc.Doc(` Specify EJSON Private key used for decryption. May be specified multiple times or separate values with commas`)) - flags.Bool("must-decrypt", false, heredoc.Doc(` - Fail if not all ejson files can be decrypted`)) + flags.Bool("skip-decrypt", false, heredoc.Doc(` + Skip decryption`)) flags.String("env-regex", "^ARGOCD_ENV_.*$", heredoc.Doc(` Only expose environment variables that match the given regex`)) flags.String("output", "yaml", heredoc.Doc(`