Skip to content

Commit b8a70fc

Browse files
committed
Update mozilla-sops.md
Signed-off-by: Rubén Laguna <ruben.laguna@gmail.com>
1 parent 9f0d8dc commit b8a70fc

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

content/en/flux/guides/mozilla-sops.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,20 @@ sops --age=age1helqcqsh9464r8chnwc2fzj8uv7vr5ntnsft0tn45v2xtz0hpfwq98cmsg \
211211
--encrypt --encrypted-regex '^(data|stringData)$' --in-place basic-auth.yaml
212212
```
213213

214-
And finally set the decryption secret in the Flux Kustomization to `sops-age`.
214+
Alternatively you can add a `.sops.yaml` file to avoid providing the `--age` and `--encrypted-regex` every time:
215+
216+
```yaml
217+
cat <<EOF > ./clusters/cluster0/.sops.yaml
218+
creation_rules:
219+
- path_regex: .*.yaml
220+
encrypted_regex: ^(data|stringData)$
221+
age: age1helqcqsh9464r8chnwc2fzj8uv7vr5ntnsft0tn45v2xtz0hpfwq98cmsg
222+
EOF
223+
224+
sops --encrypt --in-place basic-auth.yaml
225+
```
226+
227+
And finally set the decryption secret in the Flux Kustomization to `sops-age`. i.e `flux create kustomization my-kustomization --source=GitRepository/my-repo --path="./kustomize/dev/" --prune=true --interval=1m --decryption-provider sops --decryption-secret sops-age --export`
215228

216229
## Encrypting secrets using HashiCorp Vault
217230

0 commit comments

Comments
 (0)