Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion content/en/flux/guides/mozilla-sops.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,20 @@ sops --age=age1helqcqsh9464r8chnwc2fzj8uv7vr5ntnsft0tn45v2xtz0hpfwq98cmsg \
--encrypt --encrypted-regex '^(data|stringData)$' --in-place basic-auth.yaml
```

And finally set the decryption secret in the Flux Kustomization to `sops-age`.
Alternatively you can add a `.sops.yaml` file to avoid providing the `--age` and `--encrypted-regex` every time:

```yaml
cat <<EOF > ./clusters/cluster0/.sops.yaml
creation_rules:
- path_regex: .*.yaml
encrypted_regex: ^(data|stringData)$
age: age1helqcqsh9464r8chnwc2fzj8uv7vr5ntnsft0tn45v2xtz0hpfwq98cmsg
EOF

sops --encrypt --in-place basic-auth.yaml
```

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`

## Encrypting secrets using HashiCorp Vault

Expand Down