Using workload-helm#
workload-helm is our Helm chart for containerised applications. You write a short values.yaml; the chart creates the Deployment, Service, Ingress, NetworkPolicy, autoscaler and monitor for you. The full chart reference is the Workload Helm section; Deploying with FluxCD shows how to install it on your cluster.
What to keep in mind on your cluster#
- Databases come as a managed service. Order them from us and read the credentials from OpenBao (Getting started). Don't use the chart's
persistence.postgresor Redis options. - Set the host name. Autoconfig needs
autoconfig.ingress.host; your names are under*.workload.<project>.<org>.kloudease.tech. - Refused options.
hostPathvolumes, privileged containers and the other settings under Rules the cluster enforces are refused, even though the chart offers them. - Kinds the chart can't create. A release installs only the kinds listed for
developerin the Roles Reference. Options that createCertificate,IngressRoute,PrometheusRuleor similar objects fail.
Tools on your machine#
| Tool | Needed for |
|---|---|
kubectl and kubelogin |
Working with the cluster |
helm |
Rendering the chart locally (optional) |
flux |
Reading the status of your Flux objects (optional) |
To check what the chart renders from your values before you commit them:
# Ask us for an access token for the chart registry, then:
helm repo add kloudease --username pat --password "$GITLAB_TOKEN" \
https://gitlab.kloudease.tech/api/v4/projects/105/packages/helm/stable
helm template my-app kloudease/workload-helm --version <version> -f values.yaml
Before you go to production#
- Pin the chart version. Set an exact
spec.chart.spec.versioninstead of a range, so an upgrade happens when you choose. - Set resources. Set
requests.cpu,requests.memoryandlimits.memory. The cluster will refuse containers without them in an upcoming release. Tune them with the metrics in Perses. - Pin image tags. Use a fixed tag, not
:latest. - Keep secrets out of values. Read them from OpenBao with an
ExternalSecret(Getting started). - Add health probes, so the cluster restarts a stuck container and sends traffic only to ready ones.