Skip to content

Erhvervsstyrelsen/helmstack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Helmstack

Helmstack is heavily inspired by helmfile.

helmfile is a great project and way more advanced than helmstack. But I found it difficult to use when dealing with multiple chart versions spanning different environments.

The idea behind helmstack is that you have a basic stack file for which you use overlays to handle different versions in different environments. Thus making it easy to deal with having one version in dev, another in test and disabling the same chart in prod.

Install

pip install helmstack

Stack file example

Default stack file is stackfile.yaml

releases:
  - name: web-env
    namespace: web
    chart: chart/web-env
    values:
      - web-env.yaml
    set:
      some: value
      yet:
        another: value

  - name: web-app
    namespace: web
    chart: chart/web-app

environments: # Optional
  dev:
    overlay:
      - env/dev.yaml
  prod:
    overlay:
      - env/prod.yaml

repositories: # Optional
  - name: chart
    url: https://chartmuseum.somewhere.dk

helmDefaults: # Optional
  recreatePods: true
  force: true

Overlay example (env/dev.yaml)

releases:
  web-env:
    version: 1.7.0
    set:
      some: new-value
  web-app:
    version: 1.39.0
    ignore: true

Development setup

virtualenv venv
source venv/bin/activate
pip install --editable .

Release

python setup.py sdist bdist_wheel
python -m twine upload dist/*

TODO

Write tests

So far this is a POC but tests should be written

Environment varialbes

Support .env files and regular environment variables

Templating

Support some sort of templating language... Maybe

s/overlay/overlays/ ?

Either stop supporting multiple overlay files or rename key to overlays

Support referencing charts by urls... git urls

.helmstack file for defaults

environment: dev context: ml-dev some: thing

Stacks?

stacks:

  • name: sud url: git...
  • name: elk url: git...

Support multiple stack files?

helmstack ... -f elk.yaml -f whoami.yaml sync

values.yaml.gotmpl

Parse *.yaml.gotmpl files and use the output as value files This could be handy when inlining xml, certs and other kind of files

https://github.com/powerman/gotmpl https://github.com/subfuzion/envtpl

Variables?

variables: name: value

And then use the above as ${name}?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%