bitnami-labs / sealed-secrets

A Kubernetes controller and tool for one-way encrypted Secrets
Apache License 2.0
7.73k stars 687 forks source link

Add sprig function library for templating #1542

Closed jfly closed 5 months ago

jfly commented 5 months ago

This fixes https://github.com/bitnami-labs/sealed-secrets/issues/1534 and https://github.com/bitnami-labs/sealed-secrets/issues/1193.

Description of the change

Add sprig function library for templating

Benefits

As described in https://github.com/bitnami-labs/sealed-secrets/issues/1534, this lets people safely generate more types of configuration (such as yaml files) and safely and correctly escape passwords.

Possible drawbacks

I have not removed env, expandenv, and getHostByName, as argocd does. I supposed there's some security concern here? Happy to filter them out if folks like.

Applicable issues

Additional information

Thanks for the consideration!

jfly commented 5 months ago

Oh yikes. Sorry, I am a complete go noob. sprig should definitely not be an indirect dependency. Fixed!

alemorcuq commented 5 months ago

Thanks @jfly !