viaduct-ai / kustomize-sops

KSOPS - A Flexible Kustomize Plugin for SOPS Encrypted Resources
Apache License 2.0
615 stars 83 forks source link

Support for binary encrypted files #210

Closed paul-conneqtech closed 8 months ago

paul-conneqtech commented 8 months ago

I ran into the issue that I cannot encrypt a binary file and import that as file secret. With this patch it is possible.

Generated secrets use data instead of stringdata.

Using the base64 encoded data attributes allow the use of encrypted binary files to be used.

paul-conneqtech commented 8 months ago

Hi @devstein, I could implement that, however I fail to see how it is not backwards compatible. Maybe I'm not using this to its full potential, but this tool is for generating Kubernetes compatible YAML secrets, and both stringData and data are supported, and interpreted with the same secret result in Kubernetes.

That said, do you suggest adding "binaryFiles" option next to the "files" option?

paul-conneqtech commented 8 months ago

I created a new PR for a more backwards compatible solution: https://github.com/viaduct-ai/kustomize-sops/pull/211