{"id":17006110,"url":"https://github.com/duologic/helm-tanka","last_synced_at":"2025-04-12T06:31:51.406Z","repository":{"id":55012989,"uuid":"323624320","full_name":"Duologic/helm-tanka","owner":"Duologic","description":"A Helm plugin for rendering Jsonnet into Helm charts with Tanka.","archived":false,"fork":false,"pushed_at":"2021-08-04T15:34:50.000Z","size":30,"stargazers_count":25,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T02:03:18.938Z","etag":null,"topics":["helm-plugin","jsonnet","tanka"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Duologic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-22T12:48:30.000Z","updated_at":"2025-01-31T19:04:35.000Z","dependencies_parsed_at":"2022-08-14T09:01:06.928Z","dependency_job_id":null,"html_url":"https://github.com/Duologic/helm-tanka","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fhelm-tanka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fhelm-tanka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fhelm-tanka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fhelm-tanka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Duologic","download_url":"https://codeload.github.com/Duologic/helm-tanka/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529744,"owners_count":21119572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["helm-plugin","jsonnet","tanka"],"created_at":"2024-10-14T05:05:01.312Z","updated_at":"2025-04-12T06:31:51.121Z","avatar_url":"https://github.com/Duologic.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Helm Tanka plugin\n\nA Helm plugin for rendering Jsonnet into Helm charts with Tanka.\n\nHeavily inspired by https://github.com/technosophos/helm-ksonnet.\n\n## Installation\n\nPrerequisites:\n\n* [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler/)\u003e=0.4.0\n* [tanka](https://tanka.dev/)\u003e=0.17.1\n* [helm](https://helm.sh/)\u003e=3.4 (tested with version 3.6.2)\n\nInstall the Helm plugin:\n\n```console\n$ helm plugin install https://github.com/Duologic/helm-tanka.git\n```\n\n## Usage\n\nAfter installation, the plugin is available at `helm tanka`.\n\n```console\n$ helm tanka help\n\nThis plugin provides integration with the Tanka project.\n\nIt provides Tanka integration with Helm, generating Helm\ntemplates from jsonnet source.\n\nAvailable Commands:\n  create    Create initial setup\n  fetch   Fetch a Jsonnet library (on first setup)\n  show    Show the generated Kubernetes manifests.\n  build   Build the jsonnet files into a Kubernetes manifests, but don't package it.\n  package Generated a packaged Helm chart.\n\nFetch usage:\n\n   $ helm tanka fetch \u003curl\u003e \u003centrypoint\u003e\n\nTypical usage:\n\n   $ helm tanka create prometheus\n   $ helm tanka fetch prometheus github.com/grafana/jsonnet-libs/prometheus prometheus/prometheus.libsonnet\n   $ helm tanka package prometheus\n   $ helm install ./prometheus-0.1.0.tgz \n\n```\n\n### Writing Tanka Charts\n\nAlso see included example.\n\nGet started by creating a standard chart:\n\n```console\n$ helm tanka create prometheus\n```\n\nYou can populate your `values.yaml` with the required data:\n\n```console\n$ cat prometheus/values.yaml\n\nnamespace: 'mynamespace'\n```\n\nThen fetch the library you want to use in this Helm chart:\n\n```console\n$ helm tanka fetch prometheus github.com/grafana/jsonnet-libs/prometheus prometheus/prometheus.libsonnet\n```\n\nAfter this you can edit the `prometheus/jsonnet/main.jsonnet` in case you crave more advanced use cases:\n\n```jsonnet\nlocal yaml = std.native('parseYaml')(std.extVar('yaml'))[0];\n{\n  apiVersion: 'tanka.dev/v1alpha1',\n  kind: 'Environment',\n  metadata: {\n    name: '.',\n  },\n  spec: {\n    apiServer: '',\n    namespace: yaml.namespace,\n    resourceDefaults: {},\n    expectVersions: {},\n  },\n  data:\n    (import 'prometheus/prometheus.libsonnet')\n    + { _config+: yaml },\n}\n```\n\n\n### Testing Your Chart\n\nTo test that your chart is working correctly, use the `helm tanka show` command:\n\n```console\n$ helm tanka show ./prometheus/\n\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: prometheus\n  namespace: mynamespace\n---\napiVersion: v1\ndata:\n  alerts.rules: |\n    groups:\n\n# ...\n```\n\n### Packaging and Installing Your Chart\n\nThe first step is to create a chart package, and then install it:\n\n```console\n$ helm tanka package ./prometheus\nSuccessfully packaged chart and saved it to: ./prometheus-0.1.0.tgz\n```\n\n\nAt this point, you can now easily install this package using the regular Helm commands:\n\n```console\n$ helm install ./prometheus-0.1.0.tgz\n```\n\n\u003e TIP: You can also use `helm install --dry-run --debug ./prometheus-0.1.0.tgz` to run a test install.\n\n### Installing without Packaging\n\nIt is possible to install a chart without first packaging it. In this method, we build the Kubernetes manifests but do not package the chart:\n\n```console\n$ helm tanka build ./prometheus\n./prometheus/templates/apps-v1.StatefulSet-prometheus.yaml\n./prometheus/templates/rbac.authorization.k8s.io-v1beta1.ClusterRoleBinding-prometheus.yaml\n./prometheus/templates/rbac.authorization.k8s.io-v1beta1.ClusterRole-prometheus.yaml\n./prometheus/templates/v1.ConfigMap-prometheus-alerts.yaml\n./prometheus/templates/v1.ConfigMap-prometheus-config.yaml\n./prometheus/templates/v1.ConfigMap-prometheus-recording.yaml\n./prometheus/templates/v1.ServiceAccount-prometheus.yaml\n./prometheus/templates/v1.Service-prometheus.yaml\n```\n\nThis tells us that it has built the manifest, but has not packaged it. We can still use Helm to install it, though:\n\n```console\n$ helm install ./prometheus\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduologic%2Fhelm-tanka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduologic%2Fhelm-tanka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduologic%2Fhelm-tanka/lists"}