mirror of
https://github.com/hanzoai/traces.git
synced 2026-10-30 18:20:41 +00:00
* feat!: add tanka-util dependency and update dependencies Signed-off-by: irizzant <[email protected]> * feat!: add inline environments support Signed-off-by: irizzant <[email protected]> * feat: add documentation in readme Signed-off-by: irizzant <[email protected]> * chore: update CHANGELOG.md Signed-off-by: irizzant <[email protected]>
44 lines
1.6 KiB
Cheetah
44 lines
1.6 KiB
Cheetah
Package `tanka_util` provides jsonnet tooling that works well with
|
|
[Grafana Tanka](https://tanka.dev) features. This package implements
|
|
[Helm](https://tanka.dev/helm) and [Kustomize](https://tanka.dev/helm)
|
|
support for Grafana Tanka.
|
|
|
|
### Usage
|
|
|
|
> **Warning:** [Functionality required](#internals) by this library is still
|
|
> experimental and may break.
|
|
|
|
The [`helm.template`](#fn-helmtemplate) function converts a Helm Chart into a
|
|
Jsonnet object to be consumed by tools like Tanka. Similarly the
|
|
[`kustomize.build`](#fn-kustomizebuild) function expands Kustomizations.
|
|
|
|
Helm Charts are required to be available on the local file system and are
|
|
resolved relative to the file that calls `helm.template`.
|
|
|
|
Kustomizations are also resolved relative to the file that calls
|
|
`kustomize.build`.
|
|
|
|
```jsonnet
|
|
%s
|
|
```
|
|
|
|
For more information on that see https://tanka.dev/helm
|
|
|
|
### Internals
|
|
|
|
The functionality of `helm.template` is based on the `helm template` command.
|
|
Because Jsonnet does not support executing arbitrary command for [good
|
|
reasons](https://jsonnet.org/ref/language.html#independence-from-the-environment-hermeticity),
|
|
a different way was required.
|
|
|
|
To work around this, [Tanka](https://tanka.dev) instead binds special
|
|
functionality into Jsonnet that provides `helm template`.
|
|
|
|
This however means this library and all libraries using this library are not
|
|
compatible with `google/go-jsonnet` or `google/jsonnet`.
|
|
|
|
Kustomize is build so that each kustomization can pull another kustomization
|
|
from the internet. Due to this feature it is not feasible to ensure hermetic and
|
|
reprodicible kustomize builds from within Tanka. Beware of that when using the
|
|
Kustomize functionality.
|