Each chart must implement the common targets interface with the following minimum required files:
Chart.yaml
Earthfile
Each Earthfile
Chart must implement the following targets to integrate with the CI:
+sources
: Raw sources of the chart without the dependencies.
Important
A LICENSE file is included in every chart through the helper SOURCE
+dependencies
: Raw sources with dependencies updated.+validate
: Validates the chart, including its dependencies.+package
: Packages the chart from validated sources.+readme
: (Optional): Include README when dependendies are validated.
The README file is generated with
helm-docs
and included in the chart through the helper README_GENERATOR.
Tip
A file named README.md.gotmpl
can be added to the chart to customize the README generation.
+schema
: (Optional): Generate a values schema from thevalues.yaml
and include it in the chart sources. Then it will be validated with the+validate
target.
Each chart must implement the core Helm library as a dependency to include the common helpers for:
-
Improve resource naming
-
Values naming
-
Global values structure accross all charts, including settings
- Monitoring
- Traces(OTLP)
- Metrics(OTLP)
- Logs(JSON)
- Storage
- PostgreSQL (Bitnami) (Internal or External)
- Nats (Nats.io) (Internal)
- Monitoring
-
(Optionals):
- AWS IAM
- AWS Target Groups
- Ingress
- PodDisruptionBudget
- HorizontalPodAutoscaler
- ServiceAccount
- RBAC
- NetworkPolicy
To validate the all the changes arround the repository, run the following command:
earthly +pre-commit
-
First run once running it for the first time, it will build all the dependencies and validate all the charts and the charts.
-
Second run It will validate the future changes only where it needs to be validated thanks to caches.
- Naming conventions for included resource
- Labels selection
- Default environment variables bindings
- Resources disablings
- HorizontalPodAutoscaler
- Ingress
- PodDisruptionBudget
- Subchart disabling
- Secret mapping
- Configmap mapping
- Managed Stacks Features: Disable GRPC communication with any type of Agent
The CI is based on GitHub Actions, triggered on each PR and the main branch. It is composed of the following workflows:
- Pull Request: PR
- Validates the PR name.
- Labels the PR with the charts who have changed in the
charts/
directory. - Lint, Template, Generate Readmes for any charts who has changed. And Test Requirements accross on all charts
earthly +ci
.
- Release: Main
- Lint, Template, Generate Readmes for any charts who has changed. And Test Requirements accross on all charts
earthly +ci
. - Release any
Chart.yaml
.version
that have been upgraded.chart-releaser
is based on builded Artifact. - It creates a new tag with the chart version and releases on github it to the Helm repository.
- Lint, Template, Generate Readmes for any charts who has changed. And Test Requirements accross on all charts
External repositories can rely on the +package
target and artifact to deploy from a specific branch or tag.
earthly github.com/formancehq/helm/charts/cloudprem+package
The helm repository is ghcr.io/formancehq/helm
and can be used to deploy the charts.
helm upgrade --install regions ghcr.io/formancehq/helm/regions --version v2.0.18