fix: encrypt sops files that are not already encrypted in sops task

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2024-01-17 20:45:36 -05:00
1 parent 95094450fb
commit 8b20e9e944
1 file changed
+2 -2
+2 -2
View File
@@ -14,7 +14,7 @@ tasks:
- test -f "{{.SOPS_AGE_FILE}}" - test -f "{{.SOPS_AGE_FILE}}"
encrypt: encrypt:
desc: Encrypt all Kubernetes SOPS secrets desc: Encrypt all Kubernetes SOPS secrets that are not already encrypted
cmds: cmds:
- for: { var: file } - for: { var: file }
task: .encrypt-file task: .encrypt-file
@@ -22,7 +22,7 @@ tasks:
file: "{{.ITEM}}" file: "{{.ITEM}}"
vars: vars:
file: file:
sh: find {{.KUBERNETES_DIR}} -type f -name "*.sops.*" sh: find "{{.KUBERNETES_DIR}}" -type f -name "*.sops.*" -exec grep -L "ENC\[AES256_GCM" {} \;
.encrypt-file: .encrypt-file:
internal: true internal: true