helm-secrets icon indicating copy to clipboard operation
helm-secrets copied to clipboard

Suppress decrypted file list from `helm secrets template` output

Open yujunz opened this issue 6 years ago • 5 comments
trafficstars

I want to pipe the output of helm secrets template to some yaml processor while an error occurred because an extra line in the output

...

files/secrets.yaml.dec

It seems helm secrets print the list of decrypted files to stdout. Is it possible to suppress this message?

yujunz avatar Aug 21 '19 03:08 yujunz

This is the same issue I described here: https://github.com/futuresimple/helm-secrets/issues/126

ilionblaze avatar Aug 23 '19 17:08 ilionblaze

Bump. 👀

lodotek avatar Feb 17 '20 17:02 lodotek

Came here for this. helm secrets needs a --quiet option, pressing all output, except desired (e.g. templates would output the template).

guice avatar Mar 26 '20 19:03 guice

I want to point out this fundamentally breaks a helm template's use case of allowing you to pipe into kubectl apply - e.g. helm template | kubectl apply -f -

When there's a newer .dec file, you're given a prefix line saying the .dec is newer, then the template. When there is not, you're given a suffix line outputting the decrypted file. This makes is horrible in developing automated systems to pipe out to kubectl. I actually had to manually decrypt the file first, just so I can predict the output being on the first line so I can remove it first, before sending to kubectl.

In my opinion, this needs to be moved up in priority. How do we get more sights on this issue?

guice avatar Mar 27 '20 15:03 guice

Just ran into this. Unfortunately will need to fork as this interferes with the helm template workflow. A good philosophy might be that helm secrets should produce stdout that is YAML compatible comments, a list of files preceded with # would have avoided this issue.

mosen avatar May 27 '20 00:05 mosen