Skip to content

Directory as release

  • If you want to keep a group of releases where release name is a dir name.

Create the project

Project structure

.
├── README.md
├── helmwave.yml.tpl
└── releases
    ├── my-app-a
       └── values.yml
    ├── my-app-b
       └── values.yml
    └── my-app-c
        └── values.yml
helmwave.yml.tpl
project: &project my-project
version: "0.32.3"

.options: &options
  wait: true
  wait_for_jobs: true
  force: false
  timeout: 10m
  chart: some-chart
  atomic: false
  max_history: 3
  create_namespace: true
  offline_kube_version: 1.25.2
  pending_release_strategy: rollback

releases:
  {{- range (file.ReadDir "./releases") }}
  - name: {{.}}
    tags: [{{.}}]
    namespace: *project # `namespace: {{.}}` if you want a release in own namespace
    <<: *options
    values:
      - {{.}}/values.yml
  {{ end }}

Build

export APP=my-app-b
helmwave build --templater gomplate --yml -t $APP --diff-mode local
helmwave.yml
project: &project my-project
version: "0.32.3"

.options: &options
  wait: true
  wait_for_jobs: true
  force: false
  timeout: 10m
  chart: some-chart
  atomic: false
  max_history: 3
  namespace: *project
  create_namespace: true
  offline_kube_version: 1.25.2
  pending_release_strategy: rollback

releases:
  - name: my-app-a
    tags: [my-app-a]
    <<: *options
    values:
      - my-app-a/values.yml

  - name: my-app-c
    tags: [my-app-c]
    <<: *options
    values:
      - my-app-c/values.yml

  - name: my-app-b
    tags: [my-app-b]
    <<: *options
    values:
      - my-app-b/values.yml