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

Allow templating of st2.packs.configs in values.yaml #397

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jk464
Copy link
Contributor

@jk464 jk464 commented Feb 13, 2024

As it says on the tin.

Allows the use of go templating in the st2.packs.configs value when creating the Configs ConfigMap

@pull-request-size pull-request-size bot added the size/XS PR that changes 0-9 lines. Quick fix/merge. label Feb 13, 2024
@cognifloyd
Copy link
Member

Fascinating. Do you have any examples of how you would use this?

@cognifloyd
Copy link
Member

Would you look at adding some unit tests for st2.packs.configs? It is on this list of features that are missing unit tests: #28 (comment)

You can look at the other files under tests/unit/ to see how we've tested other features.

The tests will be a good way to show examples of how making the configs templatable could be used.

In particular I want to make sure something with a more complex template (maybe a range loop?) will render and get indented correctly. I wonder if we'll need to loop over each entry in .Valus.st2.packs.configs and template the contents of each file.

@jk464 jk464 force-pushed the feature/pack-config-templating branch from 9f4b1bc to 5acc4c4 Compare May 8, 2024 14:35
@jk464
Copy link
Contributor Author

jk464 commented May 8, 2024

Would you look at adding some unit tests for st2.packs.configs? It is on this list of features that are missing unit tests: #28 (comment)

You can look at the other files under tests/unit/ to see how we've tested other features.

The tests will be a good way to show examples of how making the configs templatable could be used.

In particular I want to make sure something with a more complex template (maybe a range loop?) will render and get indented correctly. I wonder if we'll need to loop over each entry in .Valus.st2.packs.configs and template the contents of each file.

I can take a stab at it - but could we get #417 reviewed and merged first so I don't have to write the tests twice ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Helm size/XS PR that changes 0-9 lines. Quick fix/merge. st2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants