Helm charts
What is a Helm chart
To deploy an app into a kubernetes cluster we use Helm (https://Helm.sh/ ). Helm makes it possible to create so-called charts which contain all kubernetes yaml files needed to deploy a single app. Helm also adds a way to template these yaml files, so you can create value yaml files per environment. The value yaml files contain all overrides required for an environment (i.e. the url of the app, which is different for test,acceptance and production).
Since the Parro Nexus Helm charts are not bound to a specific version of an app we made a separate git repository for the charts: https://github.com/topicusonderwijs/parro-connect-charts. “not bound to a specific version” means you can create numerous features in an app which don’t need any changes to the way the app is deployed on k8s.
For example when you add a feature to add database logging and duration metrics which don’t add new environment variables you don’t change anything in the Helm chart files. So you can use the same Helm chart you used in the previous version of the app. The only thing that changes is the docker tag for the app version. However, the docker tag is already configurable in the values.yaml and is overridden in the infra repo.
Building the charts
There is a special Jenkins job for building the Helm charts (https://jenkins2.topicusonderwijs.nl/view/Parro/job/Microservices/job/Helm-charts/).
Each commit in the Parro Nexus Helm repo triggers a build of this Jenkins job. The job will use helm package and helm publish commands to create the chart and deploy it to the artifactory.
Since Helm charts are often cached it is required to change the version in the Chart.yaml file when you want your changes to have any affect.
Adding new charts
You can create a new chart by running Helm create <chart-name>. This will create a default Helm chart.
All Parro Nexus charts however use the same setup. It is therefore much easier to copy an existing chart and change all references to the chart name in the yaml files.