Integrate with Helm #1190
Replies: 2 comments 3 replies
-
|
I actually spent a little time porting a chart over the Pkl. Check it out - https://github.com/MarkSRobinson/nginx-pkl |
Beta Was this translation helpful? Give feedback.
-
|
Hi there! This is something we've given some thought to. We couldn't share details back in August, but we're now happy to share Basic usage of the package/reader looks like this: import "@helm/helm.pkl"
import "@k8s/K8sResource.pkl"
resources: Mapping<String, K8sResource> =
new helm.Template {
chart = "path/to/my/chart" // chart repo/name, oci:// URI, or absolute path on disk
version = "0.1.0" // chart versions (if using OCI or repo, may be null)
releaseName = "my-release" // release name to use for the chart templates
namespace = "my-namespace" // namespace to use for the chart templates (see `helm template --namespace`)
values = new Dynamic { // custom values to pass into the helm chart
image {
repository = "my-registry.example.com/nginx"
}
}
}.resourcesYou can use Pkl to construct the values to supply to the chart, and if the chart provides JSON Schema for its values you can even generate Pkl types for it using If you give this a try, let us know how it works for you! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Given that replacing Helm will probably never happen since almost all projects are using it as a way for people to deploy their application on Kubernetes, how would integration with it look like?
It would be nice that you can somehow import or amend a Helm chart and it's resource (example the Redis Helm chart) using Pkl.
Not sure if this is feasible and of Pkl is capable in doing this. I tried with a generated yaml manifest from a Helm chart and convert that into a pkl file but I'm not getting far. So I wonder if other people have looked into this and what their experience is..
Beta Was this translation helpful? Give feedback.
All reactions