app-template
by alekc
Generic Helm application scaffold backed by the alekc common library. Drop it in, set your image and values, get a production-ready Deployment, Service, Ingress, PVC, and more with no boilerplate.
About this chart
app-template
Generic Helm application scaffold backed by the alekc common library. Drop it in, set your image and values, get a production-ready Deployment, Service, Ingress, PVC, and more with no boilerplate.
A thin scaffold on top of the common library that gives you a
fully-configured Kubernetes application from a single values.yaml. You get Deployment,
Service, Ingress, PVC, RBAC, cert-manager Certificate, NetworkPolicy, and more -- all driven
by values, no Kubernetes YAML to write yourself.
This chart is intentionally minimal. It contains no application-specific logic: just the loader wiring that activates the library. Clone it, rename it, and fill in your values.
Quick start
From the classic chart repository:
helm repo add alekc https://charts.alekc.dev
helm repo update
helm install my-app alekc/app-template \
--set image.repository=nginx \
--set image.tag=1.27 \
--set service.main.ports.main.port=80
Or directly from the OCI registry, no helm repo add needed:
helm install my-app oci://charts.alekc.dev/app-template --version 2.1.0 \
--set image.repository=nginx \
--set image.tag=1.27
Or with a values file:
helm install my-app alekc/app-template -f my-values.yaml
Verifying the signature
curl -sO https://charts.alekc.dev/pubring.gpg
helm pull oci://charts.alekc.dev/app-template --version 2.1.0 --verify --keyring pubring.gpg
What the common library gives you
| Feature | Values key |
|---|---|
| Deployment / StatefulSet / DaemonSet / Job / CronJob | workload |
| ClusterIP / LoadBalancer / NodePort services | service |
| Ingress with Traefik + cert-manager integration | ingress |
| Persistent volumes | persistence |
| ConfigMaps and Secrets | configmap, secret |
| RBAC (Role + RoleBinding or cluster-wide) | rbac, serviceAccount |
| cert-manager Certificate resources | certificate |
| CloudNativePG clusters with backups | cnpg |
| NetworkPolicy | networkPolicy |
| Any raw Kubernetes manifest | additionalManifests |
Full values reference: https://gitlab.com/alexander-chernov/helm/common/-/blob/master/values.yaml
Maintainers
| Name | Url | |
|---|---|---|
| alekc | [email protected] |
Source Code
Requirements
| Repository | Name | Version |
|---|---|---|
| https://charts.alekc.dev | common | 39.0.3 |
Gotchas
-
fullnameOverride: by default the release name drives all resource names (helm install my-app-> resources namedmy-app). SetfullnameOverrideto pin a fixed name regardless of the release name:fullnameOverride: "my-service" -
The common library defaults to
readOnlyRootFilesystem: trueandrunAsUser: 568. An image that writes to its own directories at startup (most stock upstream images) needs an override, see the common library's own contract and gotchas for the exactsecurityContextshape and theemptyDirscratch-space pattern. -
This chart carries no application-specific defaults. Every value not explicitly set above falls through to
common's own defaults, read its values reference (linked above) rather than this chart's, mostly-emptyvalues.yaml.
Upgrade notes
No breaking changes yet, version tracks common's own releases as they land.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| fullnameOverride | string | "" | Overrides the chart's fullname. Pin this to keep resource names stable regardless of the release name, see the README's fullnameOverride section. |
| image.pullPolicy | string | "IfNotPresent" | Image pull policy. |
| image.repository | string | "busybox" | Container image repository. busybox is a placeholder, replace it. |
| image.tag | string | "latest" | Container image tag. |
| ingress.main.enabled | bool | false | Renders an Ingress for the main service. |
| ingress.main.hosts | list | [{"host":"example.com","paths":[{"path":"/","pathType":"Prefix","service":{"name":"main","port":"main"}}]}] | Ingress host and path rules. |
| persistence.config.accessMode | string | "ReadWriteOnce" | PVC access mode. |
| persistence.config.enabled | bool | false | Renders this volume. |
| persistence.config.mountPath | string | "/mountPath" | Where the main container mounts this volume. |
| persistence.config.size | string | "10Mi" | PVC size. |
| persistence.config.targetSelectAll | bool | true | Mounts this volume on every container in the workload. |
| persistence.config.type | string | "pvc" | Volume type. |
| service.main.ports.main.port | int | 3000 | Service port. |
Deploy app-template with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has app-template on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartapp-template is pinned at v3.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply