Single app multi envs
When we work with helm sometimes we need dynamics chose environment.
export CI_ENVIRONMENT_NAME=stage
helm upgrade --install my-release my-chart-repo/my-chart-app -f values/_.yml -f values/$CI_ENVIRONMENT_NAME.yaml
Project structure
.
├── helmwave.yml.tpl
└── values
├── _.yml
├── prod.yml
├── qa.yml
└── stage.yml
Create helmwave.yml.tpl
version: 0.19.3
releases:
- name: my-release
chart:
name: my-chart-repo/my-chart-app
# yaml says "Who is the last one is right."
values:
# Default
- values/_.yml
# For specific ENVIRONMENT
- values/{{ requiredEnv "CI_ENVIRONMENT_NAME" }}.yml
create_namespace: true
image:
tag: {{ env "pass-git-tag" }}
podAnnotations:
gitCommit: {{ requiredEnv "pass-git-commit" | quote }}
replicaCount: 6
replicaCount: 2
replicaCount: 4
Run
export CI_ENVIRONMENT_NAME=stage
helmwave yml
helmwave build
helmwave up
or in one command
helmwave up --build --yml