Helm templating
Simplification of Kubernetes manifest creation using Helm
Overview
Helm supports advanced templating while remaining easy to use when pre-prepared Helm charts are available. It enables the continuous evolution of Helm charts over time, allowing service developers to leverage them effectively.
Helm Charts
The helm-charts repository provides Helm charts for various backend services and infrastructure components.
Helm charts allow applications to be packaged with Kubernetes manifests and configuration values, providing a standardized and repeatable deployment method.
A typical Helm chart may include:
- Deployments: Manages pod lifecycle.
- Services: Defines networking access.
- Jobs / CronJobs: Handles scheduled tasks.
- Ingress / HTTPRoutes: Controls traffic routing.
- ConfigMaps / Secrets: Manages application configuration.
Example service helm chart
Renders manifests (all configurable by values / parameters):
- service
- deployment
- RestTest cron job and job (optionally)
- ingress (optionally)
- HTTPRoute (optionally)
example of values used for deployment of svc-blog-posts
Development and Testing of Helm Charts
To test Helm charts using snapshot tests, the following workflow is followed:
- Create a test folder under
tests/
in the repository. - Run the rendering script to generate Kubernetes manifests:
tests/rerender-charts.sh
- Manually verify the rendered manifests.
- Store expected results for regression testing, ensuring they act as unit tests in the CI/CD pipeline.
- Run tests manually via:
./tests/run-tests.sh
Part of the output of snapshot tests pipeline step
For additional details, refer to the README.md.
Helm Registry
The helm-registry repository acts as an artifact repository where Helm charts are stored after packaging and versioning.
Structure of the registry:
packages/{app-name}/{app-name}-{version}.tgz
Example helm chart packages:
packages/eit-ingress-service/eit-ingress-service-1.2.0.tgz
packages/eit-ingress-service/eit-ingress-service-1.1.8.tgz
packages/eit-keycloak/eit-keycloak-1.0.0.tgz
eit-ingress-service helm chart packages
This repository enables:
- Centralized storage of Helm charts for easier access and version management.
- Simplified chart distribution and deployment across environments.
- Easy access to Helm charts from pipelines, as they are stored in a standard Git repository.