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

"helm secrets clean ." does not work

Open raufkk opened this issue 5 years ago • 1 comments

After decrypting and then cleaning with '.' as directory does not work.

➜  helm-secret git:(master) ✗ ls -l
total 8
drwxr-xr-x  7 abdul  staff   224 Jun  3 15:27 nginx
-rw-r--r--  1 abdul  staff  2439 Jun  3 17:41 secret.yaml
➜  helm-secret git:(master) ✗ helm secrets dec secret.yaml
Decrypting secret.yaml
➜  helm-secret git:(master) ✗
➜  helm-secret git:(master) ✗ ls -l
total 16
drwxr-xr-x  7 abdul  staff   224 Jun  3 15:27 nginx
-rw-r--r--  1 abdul  staff  2439 Jun  3 17:41 secret.yaml
-rw-r--r--  1 abdul  staff   118 Jun  3 17:57 secret.yaml.dec
➜  helm-secret git:(master) ✗
➜  helm-secret git:(master) ✗ helm secrets clean .
➜  helm-secret git:(master) ✗
➜  helm-secret git:(master) ✗ ls -l
total 16
drwxr-xr-x  7 abdul  staff   224 Jun  3 15:27 nginx
-rw-r--r--  1 abdul  staff  2439 Jun  3 17:41 secret.yaml
-rw-r--r--  1 abdul  staff   118 Jun  3 17:57 secret.yaml.dec
➜  helm-secret git:(master) ✗

raufkk avatar Jun 03 '20 16:06 raufkk

@raufkk I found the issue. Current release approach that all secret files have to match the pattern: https://github.com/zendesk/helm-secrets/blob/master/secrets.sh#L441. Unfortunately, we do not check this constrains during decryption but when we removed files we search for file secrets*.yaml https://github.com/zendesk/helm-secrets/blob/master/secrets.sh#L441 I will correct it this week to not allow decrypt files that not match the pattern. Also please rename your file to secrets.yaml

kaarolch avatar Jul 08 '20 06:07 kaarolch