This gist describes usage of helm umbrella charts to manage deployment of multiple micro-services to kubernetes
Developers can maintain a separate Github repo for base helm charts.
A base-microservice chart will have all sorts of kubernetes templates like HPA,ConfigMap,Secrets,Deployment,Service,Ingress etc , each having the option to be enabled or disabled.
And the base chart can even contain other public charts as dependency.
Now in each microservice, we will have a dedicated chart defining a dependency of this base-microservice chart and a values file with overriding values defined.
When commit happens in the base-charts repo, as part of CI process, (along with other things) we can do
- Check if Helm index already exists in charts repository
- If exists, then download the existing index and merge currently generated index with existing one -> helm repo index --merge oldindex/index.yaml .
- If it does not exist, then we create new Helm index ->( helm repo index . ) Then upload the archived charts and index yaml to our charts repository.
And during Continuous Deployment of each microservice, we can have these steps (among others):
- Fetch helm dependencies (helm dependency update ./charts/my-service-A)
- Deploy my release to kubernetes (helm upgrade --install my-service-a ./charts/my-service-A)