You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 17, 2021. It is now read-only.
KSonnet had an std.native function: renderHelmChart
A similar thing can be achieved by using a workaround, by doing a helm template ...
And importing the resulting YAML by using kubecfg.parseYaml
However by doing this the configuration needs to be in both YAML for the helm template, and jsonnet for the kubecfg parts. Therefor it would be a really useful if kubecfg had something similar to renderHelmChart in KSonnet.
The text was updated successfully, but these errors were encountered:
Add a new `helmTemplate` native function that downloads and expands
helm charts into jsonnet objects. The new code links helm (v3)
libraries directly, and does not require nor use the external `helm`
command.
Fixesvmware-archive#267
Example usage:
```
local kubecfg = import "kubecfg.libsonnet";
local url = "https://charts.jetstack.io/charts/cert-manager-v1.5.3.tgz";
local cm = kubecfg.helmTemplate("cert-manager", namespace, url, {
// Example values.yaml
webhook: {replicaCount: 2},
});
// ... returns a jsonnet object with filename keys from the helm chart
// and expanded/parsed Kubernetes objects as values.
// The result can be manipulated and used just like any other jsonnet
// value.
cm + {
"cert-manager/templates/webhook-deployment.yaml": {
spec+: {
template+: {
spec+: {
nodeSelector+: {"kubernetes.io/arch": "amd64"},
},
},
},
},
}
```
*Caveats:*
- Helm 'hooks' are not supported and ignored.
- Chart sort order is ignored, and the usual kubecfg sort mechanism is
used.
- `chartURL` argument uses the kubecfg URL-based importer, but
will reject relative URLs by default[1].
- HTTP_PROXY is obeyed, but there is no other cache. The helm chart
is re-downloaded on every invocation (for now).
- Probably some other things.
[1]: Relative URLs can be enabled using a new
`--allow-relative-helm-urls` flag. URLs are interpreted relative to
$PWD currently, even when used by jsonnet from remote URLs. _This will
change_. TODO: Make this consistent with usual relative `import`
semantics, and enable by default.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
KSonnet had an std.native function:
renderHelmChart
A similar thing can be achieved by using a workaround, by doing a
helm template ...
And importing the resulting YAML by using
kubecfg.parseYaml
However by doing this the configuration needs to be in both YAML for the helm template, and jsonnet for the kubecfg parts. Therefor it would be a really useful if kubecfg had something similar to renderHelmChart in KSonnet.
The text was updated successfully, but these errors were encountered: