generic

by HelmForge

Helm chartv3.2.4App 1.31.10Apache-2.0Verified publisher

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 Deployment for stateless APIs, web apps, workers behind a service, and most standard applications
  • use StatefulSet when pod identity, ordered rollout, or persistent storage per replica matters
  • use DaemonSet when 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, and sealedSecrets for secret integration. ExternalSecret, SealedSecret, ServiceMonitor, PodMonitor, PrometheusRule, KEDA, VPA, and Gateway API resources require their CRDs to exist before enabling them.
  • rbac.create and networkPolicy.enabled for least-privilege identity and traffic policy.
  • Chart-level container defaults disable privilege escalation and drop all capabilities. Any container whose effective image repository is nginx or docker.io/library/nginx adds only CHOWN, DAC_OVERRIDE, NET_BIND_SERVICE, SETGID, and SETUID for the official entrypoint and port 80. Set capabilities.add: [] in a chart-level, preset, or per-container security context to remove those additions. Security fields merge in precedence order: NGINX compatibility, chart-level securityContext, securityPreset, then per-container securityContext.
  • services[], service.headless, service.nameOverride, per-port appProtocol, and custom Ingress backends for richer networking. When service.enabled=false, Ingress paths must set backend and HTTPRoute rules must set backendRefs.
  • podMonitor, prometheusRule, advanced HPA metrics, and optional KEDA ScaledObject/ScaledJob support. KEDA ScaledObjects target the chart workload and require workload.enabled=true; use ScaledJobs for batch-only releases.
  • persistence.persistentVolumeClaims[] and explicit opt-in persistence.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) with IfNotPresent instead of relying on latest.
  • Pod templates are deterministic; use rollout.restartAt or checksum-enabled ConfigMaps/Secrets for intentional rollouts.
  • HPA now fails validation when used with DaemonSet or when hpa.maxReplicas is 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.enabled requires exactly one of pdb.minAvailable or pdb.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

FrameworkScore
MITRE + NSA + SOC275.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 containers explicit 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, and topologySpreadConstraints for 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:

ExampleDescription
web-app.yamlNode.js/Python web app with Ingress, HPA, probes
api-with-sidecar.yamlAPI server with Envoy sidecar proxy
worker.yamlBackground worker without Service/Ingress
statefulset-database.yamlStatefulSet with persistent storage
cronjob-batch.yamlBatch processing with CronJobs

Usage Guides

  • docs/deployment.md — stateless services, APIs, ingress, and autoscaling
  • docs/statefulset.md — stable identity, persistent storage, and rollout expectations
  • docs/daemonset.md — node-level agents and one-pod-per-node behavior
  • docs/batch.md — one-off jobs and scheduled workloads
  • docs/security.md — ServiceAccount, Secrets, RBAC, and NetworkPolicy
  • docs/observability.md — ServiceMonitor, PodMonitor, PrometheusRule, VPA, HPA, and KEDA
  • docs/gateway.md — Gateway API HTTPRoute patterns
  • docs/storage.md — PVC/PV ownership and StatefulSet storage patterns

Values Reference

ParameterDescriptionDefault
replicaCountPod replicas; omitted from Deployment/StatefulSet with HPA enabled, unused by DaemonSet/Job/CronJob1
nameOverrideOverride release name""
fullnameOverrideOverride fully qualified name""
commonLabelsLabels added to all resources{}
commonAnnotationsAnnotations added to chart-owned resources; resource-specific values take precedence{}
Workload
workload.enabledEnable long-running workloadtrue
workload.typeDeployment / StatefulSet / DaemonSetDeployment
workload.podManagementPolicyStatefulSet pod management—
workload.volumeClaimTemplatesStatefulSet PVC templates[]
workload.persistentVolumeClaimRetentionPolicyStatefulSet PVC retention on deletion or scale-down; empty preserves Kubernetes Retain defaults{}
workload.updateStrategyStatefulSet/DaemonSet update strategy—
minReadySecondsReady duration for long-running Pods; Deployments get a greater progress deadline at 600 or more; unused by Jobs/CronJobs0
Image
global.imageRegistryOptional registry prefix for unqualified repositories""
image.repositoryContainer image repositorydocker.io/library/nginx
image.tagImage tag1.31.10
image.digestImage digest, takes precedence over tag""
image.pullPolicyPull policyIfNotPresent
imagePullSecretsRegistry pull secrets[]
Containers
containersList of container specs1 container on port 80
initContainersInit container specs[]
Environment
envGlobal env vars for all containers (value supports tpl, e.g. {{ .Release.Namespace }})[]
envFromGlobal envFrom for all containers[]
Service Account
serviceAccount.createCreate a ServiceAccountfalse
serviceAccount.nameServiceAccount name""
serviceAccount.annotationsServiceAccount 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgeneric is pinned at v3.2.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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