helm icon indicating copy to clipboard operation
helm copied to clipboard

Adopt Pkl

Open dperetti opened this issue 2 years ago • 2 comments

Shiny and new ! https://pkl-lang.org/index.html

Pkl — pronounced Pickle — is an embeddable configuration language which provides rich support for data templating and validation. It can be used from the command line, integrated in a build pipeline, or embedded in a program. Pkl scales from small to large, simple to complex, ad-hoc to repetitive configuration tasks.

Can't wait to see Chart.pkl files everywhere!

dperetti avatar Feb 06 '24 12:02 dperetti

See also https://github.com/apple/pkl-k8s-examples

dperetti avatar Feb 06 '24 13:02 dperetti

Thanks for the suggestion! I also saw the pkl announcement and wondered how it could be used with Helm. From previous discussions I've had personally, I don't think anyone is anchored on yaml, nor particularly gotemplate / templating to implement the parameterization of Kubernetes resources that charts (generally) require.

(In fact, Helm's renderer used to allow parameterization of the "engine" used to generate Kubernetes objects. But this was removed for simplicity circa Helm 3 in favor of a direct gotemplate implentation for simplicity, as nothing took advantage of that interface)

To move forward here, I suspect a HIP would be warranted. As there are probably many nuances of how Helm might implement alternative chart rendering/parametrization and non-yaml chart/values formats.

gjenkins8 avatar Feb 13 '24 02:02 gjenkins8

This would be life changing! Most of the maintenance issues we have with charts are due to Go templates dealing with YAML indentation. Pkl looks like a solid and reliable alternative 💪

heruan avatar Feb 27 '24 07:02 heruan

I decided to play around with Pkl and I implemented the Pkl equivalent of a chart. It's pretty awesome. That chart is smaller and easier to read. Extending it also super easy and doesn't require editing the core helm chart.

Check it out at https://github.com/MarkSRobinson/nginx-pkl

MarkSRobinson avatar Apr 16 '24 18:04 MarkSRobinson

This is a pretty exciting possibility for me - my team is looking at using Pkl as a partial replacement for Helm but we've acknowledged that Helm will remain part of our workflow for the foreseeable future. If they were compatible it would be beneficial all around. Unit and integration tests are the biggest game changer IMO so an integration that includes that feature would be a big deal.

bvalyou avatar Apr 23 '24 16:04 bvalyou

Actually if you are creating your own chart, you are free to create it using pkl and export it yaml right before deploying with helm.

dperetti avatar Apr 23 '24 21:04 dperetti

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

github-actions[bot] avatar Jul 23 '24 00:07 github-actions[bot]