Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sprig function library for templating #1542

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

jfly
Copy link
Contributor

@jfly jfly commented Jun 7, 2024

This fixes #1534 and #1193.

Description of the change

Add sprig function library for templating

Benefits

As described in #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!

Copy link
Collaborator

@alemorcuq alemorcuq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jfly ! Could you please run go mod tidy? I'm pretty sure sprig should not be an indirect dependency.

This fixes bitnami-labs#1534
and bitnami-labs#1193.

Signed-off-by: Jeremy Fleischman <jeremyfleischman@gmail.com>
@jfly
Copy link
Contributor Author

jfly commented Jun 7, 2024

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

@jfly jfly requested a review from alemorcuq June 7, 2024 15:56
@alemorcuq alemorcuq merged commit 36e6308 into bitnami-labs:main Jun 10, 2024
15 checks passed
@alemorcuq
Copy link
Collaborator

Thanks @jfly !

@jfly jfly deleted the add-sprig branch June 11, 2024 22:19
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.

Templating support for escaping JSON/YAML values Sprig support in templates
2 participants