Skip to content

Global configuration of SOPS Age key #707

@LittleFox94

Description

@LittleFox94

Hi,

we are using SOPS to encrypt our secrets for various people who are allowed to see them and a single key per target environment. With this usage, it's a bit tedious to add this snippet to every single flux kustomization:

spec:
  decryption:
    provider: sops
    secretRef:
      name: sops-key

The kustomize-controller already knows when something is encrypted with SOPS (

if IsEncryptedSecret(u) {
return false, nil,
fmt.Errorf("%s is SOPS encrypted, configuring decryption is required for this secret to be reconciled",
ssa.FmtUnstructured(u))
}
), practically eliminating the need for .spec.decryption.provider. If the kustomize-controller could add keys from a configured file (perhaps even using the environment variable SOPS_AGE_KEY_FILE), configuring this on every kustomization wouldn't be needed anymore.

All this could be added on top of the current API, so no breaking change and specifying another decryption provider or an additional key source would still be possible.

Thanks for making Flux :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions