generic
by HelmForge
Generic Helm Chart for Kubernetes workloads
About this chart
Generic Helm Chart
A single chart that handles Deployments, StatefulSets, DaemonSets, Jobs, and CronJobs with a unified values interface. Designed for teams that deploy many services and want one chart to rule them all.
The default nginx:1.31.10 image addresses security advisory CVE-2026-132779
for ssl_early_data and resolves high CPU utilization when SSL backend connections
are utilized. Note that nginx 1.31.9+ introduces stricter upstream header parsing
(header lines lacking colons result in 502 Bad Gateway) and halts worker startup if
initgroups() fails. When supplying a custom image.repository, always explicitly
pin image.tag rather than inheriting the chart default.
Install
HTTPS repository
helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install my-release helmforge/generic -f values.yaml
OCI registry
helm install my-release oci://ghcr.io/helmforgedev/helm/generic -f values.yaml
Workload Types
Only one workload type is active at a time, controlled by workload.type:
workload:
enabled: true # false for Jobs/CronJobs-only releases
type: Deployment # Deployment | StatefulSet | DaemonSet
Read before choosing a mode:
- Deployment
- StatefulSet
- DaemonSet
- Batch Jobs and CronJobs
workload:
enabled: true
type: Deployment
image:
repository: myapp
tag: "1.0.0"
containers:
- name: app
ports:
- containerPort: 3000
service:
port: 3000
targetPort: 3000
ingress:
enabled: true
ingressClassName: traefik
annotations:
cert-manager.io/cluster-issuer: letsencrypt
hosts:
- host: app.example.com
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- app.example.com
secretName: app-tls
How to choose the right mode
- use
Deploymentfor stateless APIs, web apps, workers behind a service, and most standard applications - use
StatefulSetwhen pod identity, ordered rollout, or persistent storage per replica matters - use
DaemonSetwhen exactly one pod per node is the intended operating model - use Jobs or CronJobs when the release is batch-oriented and should not keep a long-running workload alive
The generic chart is most useful when your team wants one operational contract for many internal services. It is not the right choice when a product has its own topology, bootstrap flow, or domain-specific configuration model that deserves a dedicated chart.
workload:
enabled: true
type: StatefulSet
podManagementPolicy: Parallel
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: standard
resources:
requests:
storage: 10Gi
workload:
enabled: true
type: DaemonSet
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
tolerations:
- operator: Exists
workload:
enabled: false
jobs:
- name: db-migrate
command: ["npm", "run", "migrate"]
backoffLimit: 3
cronjobs:
- name: cleanup
schedule: "0 2 * * *"
command: ["npm", "run", "cleanup"]
Key Features
Multi-container pods
containers:
- name: api
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: [ALL]
add: [CHOWN, DAC_OVERRIDE, NET_BIND_SERVICE, SETGID, SETUID]
ports:
- containerPort: 3000
- name: sidecar
image:
repository: envoyproxy/envoy
tag: "v1.31"
ports:
- containerPort: 9901
Global and per-container environment
# Applied to ALL containers
env:
- name: NODE_ENV
value: "production"
envFrom:
- secretRef:
name: app-secrets
# Per-container override
containers:
- name: app
env:
- name: PORT
value: "3000"
envFrom:
- configMapRef:
name: app-config
Init containers
initContainers:
- name: wait-for-db
image:
repository: busybox
tag: "1.36"
command: ["sh", "-c", "until nc -z db 5432; do sleep 1; done"]
Probes
Global probes apply to the first container only. Each container can override with its own:
# Global (first container)
livenessProbe:
httpGet:
path: /health
port: 3000
# Per-container override
containers:
- name: app
readinessProbe:
httpGet:
path: /ready
port: 3000
Jobs and CronJobs never inherit global probes.
Extra manifests
Inject any Kubernetes resource via values, with full Helm templating support:
extraManifests:
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: '{{ include "chart.fullname" . }}-deny-all'
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: '{{ include "chart.name" . }}'
policyTypes: [Ingress, Egress]
Explicit rollouts
The chart does not add time-based pod annotations during normal renders. To intentionally roll long-running workloads, set:
rollout:
restartAt: "2026-04-27T00:00:00Z"
podAnnotations:
app.example.com/restarted-by: platform
checksum:
enabled: true
configMaps: true
secrets: true
Platform integrations
The chart now includes opt-in primitives for common platform needs:
secrets[],externalSecrets, andsealedSecretsfor secret integration. ExternalSecret, SealedSecret, ServiceMonitor, PodMonitor, PrometheusRule, KEDA, VPA, and Gateway API resources require their CRDs to exist before enabling them.rbac.createandnetworkPolicy.enabledfor least-privilege identity and traffic policy.- Chart-level container defaults disable privilege escalation and drop all capabilities. Any container whose effective
image repository is
nginxordocker.io/library/nginxadds onlyCHOWN,DAC_OVERRIDE,NET_BIND_SERVICE,SETGID, andSETUIDfor the official entrypoint and port 80. Setcapabilities.add: []in a chart-level, preset, or per-container security context to remove those additions. Security fields merge in precedence order: NGINX compatibility, chart-levelsecurityContext,securityPreset, then per-containersecurityContext. services[],service.headless,service.nameOverride, per-portappProtocol, and custom Ingress backends for richer networking. Whenservice.enabled=false, Ingress paths must setbackendand HTTPRoute rules must setbackendRefs.podMonitor,prometheusRule, advanced HPA metrics, and optional KEDA ScaledObject/ScaledJob support. KEDA ScaledObjects target the chart workload and requireworkload.enabled=true; use ScaledJobs for batch-only releases.persistence.persistentVolumeClaims[]and explicit opt-inpersistence.persistentVolumes[]for clearer storage ownership.
External Secrets
externalSecrets.items[].name keeps the standard chart naming behavior and renders as <releaseName>-<name>.
Use externalSecrets.items[].fullnameOverride when the ExternalSecret must use a literal Kubernetes name.
When spec.target.name is omitted, the chart defaults it to the rendered ExternalSecret name, matching External
Secrets Operator behavior and avoiding duplicated names in values.
externalSecrets:
enabled: true
items:
- fullnameOverride: app-env
spec:
refreshInterval: 1m
secretStoreRef:
name: vault
kind: ClusterSecretStore
dataFrom:
- extract:
key: secret/data/{{ .Release.Namespace }}/app-env
The spec of each item is rendered through tpl, so values such as backend keys can be
templated (e.g. {{ .Release.Namespace }}) to derive per-environment paths from a single definition.
Breaking-change migration notes
- The default image is pinned (currently
docker.io/library/nginx:1.31.10) withIfNotPresentinstead of relying onlatest. - Pod templates are deterministic; use
rollout.restartAtor checksum-enabled ConfigMaps/Secrets for intentional rollouts. - HPA now fails validation when used with
DaemonSetor whenhpa.maxReplicasis missing. - HPA-enabled Deployments and StatefulSets omit
spec.replicas. The first upgrade from a chart that set it explicitly, or a switch to HPA, can briefly reset replicas to one before HPA reconciles. Review replica ownership during upgrades before this transition. pdb.enabledrequires exactly one ofpdb.minAvailableorpdb.maxUnavailable.- Optional CRD-backed resources are disabled by default and must only be enabled in clusters where the corresponding operator/API is installed.
Operational guidance
Security Scan
Security Scan: generic
| Framework | Score |
|---|---|
| MITRE + NSA + SOC2 | 75.76% |
Security posture acceptable. Verified with Kubescape 4.0.13 against the rendered default manifests.
When this chart fits well
- internal platforms that deploy many services with the same operational contract
- teams that want a single chart for stateless services, workers, scheduled tasks, and simple stateful apps
- cases where the application contract is generic enough to be described by workload, containers, service, ingress, scaling, and persistence primitives
When this chart is the wrong tool
- databases and middleware with their own topology and bootstrap semantics
- applications that require custom initialization controllers, cluster formation, or product-specific CRDs
- products whose values contract should reflect domain concepts instead of generic Kubernetes objects
Recommended practices
- keep
containersexplicit and small; avoid turning one release into a large bundle of unrelated sidecars - define probes per container when more than one container is user-facing
- enable
pdb,hpa, andtopologySpreadConstraintsfor production deployments that need resilience - prefer chart examples and
ci/scenarios as the starting point for new workloads
Examples
See the examples/ directory for complete, ready-to-use values files:
| Example | Description |
|---|---|
| web-app.yaml | Node.js/Python web app with Ingress, HPA, probes |
| api-with-sidecar.yaml | API server with Envoy sidecar proxy |
| worker.yaml | Background worker without Service/Ingress |
| statefulset-database.yaml | StatefulSet with persistent storage |
| cronjob-batch.yaml | Batch processing with CronJobs |
Usage Guides
docs/deployment.md— stateless services, APIs, ingress, and autoscalingdocs/statefulset.md— stable identity, persistent storage, and rollout expectationsdocs/daemonset.md— node-level agents and one-pod-per-node behaviordocs/batch.md— one-off jobs and scheduled workloadsdocs/security.md— ServiceAccount, Secrets, RBAC, and NetworkPolicydocs/observability.md— ServiceMonitor, PodMonitor, PrometheusRule, VPA, HPA, and KEDAdocs/gateway.md— Gateway API HTTPRoute patternsdocs/storage.md— PVC/PV ownership and StatefulSet storage patterns
Values Reference
| Parameter | Description | Default |
|---|---|---|
replicaCount | Pod replicas; omitted from Deployment/StatefulSet with HPA enabled, unused by DaemonSet/Job/CronJob | 1 |
nameOverride | Override release name | "" |
fullnameOverride | Override fully qualified name | "" |
commonLabels | Labels added to all resources | {} |
commonAnnotations | Annotations added to chart-owned resources; resource-specific values take precedence | {} |
| Workload | ||
workload.enabled | Enable long-running workload | true |
workload.type | Deployment / StatefulSet / DaemonSet | Deployment |
workload.podManagementPolicy | StatefulSet pod management | — |
workload.volumeClaimTemplates | StatefulSet PVC templates | [] |
workload.persistentVolumeClaimRetentionPolicy | StatefulSet PVC retention on deletion or scale-down; empty preserves Kubernetes Retain defaults | {} |
workload.updateStrategy | StatefulSet/DaemonSet update strategy | — |
minReadySeconds | Ready duration for long-running Pods; Deployments get a greater progress deadline at 600 or more; unused by Jobs/CronJobs | 0 |
| Image | ||
global.imageRegistry | Optional registry prefix for unqualified repositories | "" |
image.repository | Container image repository | docker.io/library/nginx |
image.tag | Image tag | 1.31.10 |
image.digest | Image digest, takes precedence over tag | "" |
image.pullPolicy | Pull policy | IfNotPresent |
imagePullSecrets | Registry pull secrets | [] |
| Containers | ||
containers | List of container specs | 1 container on port 80 |
initContainers | Init container specs | [] |
| Environment | ||
env | Global env vars for all containers (value supports tpl, e.g. {{ .Release.Namespace }}) | [] |
envFrom | Global envFrom for all containers | [] |
| Service Account | ||
serviceAccount.create | Create a ServiceAccount | false |
serviceAccount.name | ServiceAccount name | "" |
serviceAccount.annotations | ServiceAccount annotations | {} |
|
Deploy generic with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has generic 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 chartgeneric is pinned at v3.2.4 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