From 4d0dcfc49315cd10df886482242acd5f58844eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=A4rnthaler?= Date: Fri, 13 May 2022 15:00:12 +0200 Subject: [PATCH] SOPS requires an explicit filename even for stdin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Bärnthaler --- docs/spec/v1beta2/kustomization.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/spec/v1beta2/kustomization.md b/docs/spec/v1beta2/kustomization.md index c5423564..a4303649 100644 --- a/docs/spec/v1beta2/kustomization.md +++ b/docs/spec/v1beta2/kustomization.md @@ -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 ``` For kustomize-controller to be able to decrypt a JSON config, you need to set the file extension to `.json`: