Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add '.sops.yaml` for age and example of --decryption-secret #1569

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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