stackstorm-k8s icon indicating copy to clipboard operation
stackstorm-k8s copied to clipboard

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

Open jk464 opened this issue 1 year ago • 3 comments

As it says on the tin.

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

jk464 avatar Feb 13 '24 15:02 jk464

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

cognifloyd avatar Apr 11 '24 03:04 cognifloyd

Would you look at adding some unit tests for st2.packs.configs? It is on this list of features that are missing unit tests: https://github.com/StackStorm/stackstorm-k8s/issues/28#issuecomment-1048530740

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.

cognifloyd avatar Apr 11 '24 03:04 cognifloyd

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 https://github.com/StackStorm/stackstorm-k8s/pull/417 reviewed and merged first so I don't have to write the tests twice ;)

jk464 avatar May 08 '24 20:05 jk464