Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Customize Helm charts without modifying them – using Grafana Tanka (grafana.com)
18 points by shorez on Oct 8, 2020 | hide | past | favorite | 1 comment


This is really cool! I prefer to keep all my in-house stuff in yaml, though of course for many big third party projects (prometheus, grafana, etc.) helm charts are the way to go.

I've long been looking for something that lets me keep my static yaml for my own projects, and helm charts with occasional small tweaks, and Tanka seems to do it!

    local parseYaml = std.native('parseYaml');
    local k = (import 'ksonnet-util/kausal.libsonnet');
    local helm = (import 'helm-util/helm.libsonnet').new(std.thisFile);
    {
      aws_secret: parseYaml(importstr 'k8s/aws-secret.yaml'),
      // etc...
      traefik: helm.template('traefik', '../../charts/traefik', {
        values: parseYaml(importstr 'values/traefik.yaml')[0],
      }) + {
        // traefik requires a /plugins-storage tmpdir
        deployment_traefik+: k.util.emptyVolumeMount('plugins-storage', '/plugins-storage'),
      },
    }
If I had one request, it'd be to be able to run an arbitrary command for manifest generation: jsonnet seems quite capable, but every once in a while you're in a rush and just can't figure out how to do something - that's when being able to generate the manifest dynamically via bash/python/whatever is quite useful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: