Skip to content

docs: fix SOPS store type for dotenv files (env -> dotenv)#1673

Open
yugstar wants to merge 1 commit into
fluxcd:mainfrom
yugstar:docs-sops-dotenv-type
Open

docs: fix SOPS store type for dotenv files (env -> dotenv)#1673
yugstar wants to merge 1 commit into
fluxcd:mainfrom
yugstar:docs-sops-dotenv-type

Conversation

@yugstar

@yugstar yugstar commented Jun 17, 2026

Copy link
Copy Markdown

Description

The SOPS encryption example in the Kustomization spec docs used:

sops -e --input-type=env config.env > config.env.encrypted

SOPS has no env store type — its formats are binary, dotenv, ini, json and yaml (see getsops/sops cmd/sops/formats/formats.go). An unrecognized --input-type silently falls back to binary, so this example encrypts the dotenv file as opaque binary rather than as a dotenv file, which then won't decrypt back into key/value pairs as intended.

Fix it to use the dotenv store explicitly:

sops -e --input-type=dotenv --output-type=dotenv config.env > config.env.encrypted

Applied to both docs/spec/v1/kustomizations.md (the canonical source imported by the Flux website) and the docs/spec/v1beta2/kustomizations.md copy.

The SOPS encryption example used `sops -e --input-type=env`, but SOPS
has no `env` store type — its formats are binary, dotenv, ini, json and
yaml, and an unknown `--input-type` silently falls back to `binary`. So
the example encrypted the dotenv file as opaque binary instead of as a
dotenv file.

Use `--input-type=dotenv --output-type=dotenv` so the file is encrypted
and decrypted as dotenv. Applied to both the v1 spec (the canonical
source imported by the website) and the v1beta2 copy.

Signed-off-by: Aman Raj <aman.yug@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant