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

SOPS requires an explicit filename even for stdin #651

Open
wants to merge 1 commit 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
6 changes: 3 additions & 3 deletions docs/spec/v1beta2/kustomization.md
Original file line number Diff line number Diff line change
Expand Up @@ -1365,9 +1365,9 @@ them on the cluster.
For secrets in `.json`, `.yaml` and `.env` format, make sure you specify the input type when encrypting them with SOPS:

```sh
cat config.json | sops -e --input-type=json > config.json.encrypted
cat config.yaml | sops -e --input-type=yaml > config.yaml.encrypted
cat config.env | sops -e --input-type=env > config.env.encrypted
sops -e --input-type=json /dev/stdin < config.json > config.json.encrypted
sops -e --input-type=yaml /dev/stdin < config.yaml > config.yaml.encrypted
sops -e --input-type=env /dev/stdin < config.env > config.env.encrypted
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding /dev/stdin was necesary for me to make the commands work (tried it with SOPS 3.7.1 and 3.7.2).
Dropping the cat was meant to simplify the command. I can put it back in if someone prefers the old version.

```

For kustomize-controller to be able to decrypt a JSON config, you need to set the file extension to `.json`:
Expand Down