ohMyHelm and 15-Factor Apps

How MIT-licensed ohMyHelm puts 15-Factor App principles into practice on Kubernetes, and where the manifests helper adds missing Kubernetes resources.

ohMyHelm and 15-Factor Apps

The 15-Factor App methodology (extending classic 12-Factor Apps with API First, Telemetry, and Authentication & Authorization) defines proven architectural principles for portable, maintainable cloud-native applications. ohMyHelm is released under the MIT License and maps a large share of these factors directly onto declarative Kubernetes manifests — with zero custom template code.

Mapping the 15 Factors to ohMyHelm

The overview below shows transparently which factors ohMyHelm covers natively through its values.yaml keys and where you complement it with the manifests helper or platform components.

# Factor Implementation with ohMyHelm Supplement / Note
1 Codebase One chart repository, environment-specific values-<env>.yaml Clean Git versioning, multi-alias in Chart.yaml
2 Dependencies Declared in Chart.yaml (dependencies) + Chart.lock Reproducible chart versions from the Helm repo
3 Config staticEnv, env, extraEnv, envFrom, configs, secrets Separation of image and environment configuration
4 Backing Services Connection parameters via env / secretKeyRef / configMapRef Databases and queues swappable without code changes
5 Build, Release, Run Immutable container images (chart.container.image with fixed tag) Rollbacks via helm rollback
6 Processes Stateless pods as a Deployment (default) Stateful services explicitly as a StatefulSet
7 Port Binding chart.container.ports, chart.service, chart.ingress / ingressSimple Clean routing without fixed host ports
8 Concurrency chart.replicaCount and scaling HPA on K8s ≥ 1.25 via manifests: (autoscaling/v2)
9 Disposability livenessProbe, readinessProbe, startupProbe, strategy Clean rollouts and fast startup/shutdown cycles
10 Dev/Prod Parity Identical templates and images across all stages, varying only values No diverging scripts per environment
11 Logs Containers log to stdout/stderr; optional sidecar via chart.sidecar or extraContainers Centralized log collection by the platform
12 Admin Processes One-off migrations/tasks via root job: or chart.initContainer CronJob via manifests: if needed
13 API First Exposed endpoints via chart.ingress / ingressSimple Gateway API (HTTPRoute) via manifests: if needed
14 Telemetry chart.monitoring / monitoring (Prometheus ServiceMonitor) + health probes Omit scheme for now (see ServiceMonitor)
15 Auth & Authorization chart.serviceAccount, chart.rbac (roleRules), podSecurityContext, securityContext, imageCredentials NetworkPolicy and ClusterRole via manifests:

Practical Example: A 15-Factor-Compliant Service with ohMyHelm

The following example shows a real, 100% schema-compliant values.yaml putting key 15-Factor principles into practice:

# Chart.yaml
apiVersion: v2
name: acme-orders
version: 0.1.0

dependencies:
  - name: ohmyhelm
    alias: orders-api
    repository: https://gitlab.com/api/v4/projects/28993678/packages/helm/stable
    version: 1.18.0
# values.yaml
orders-api:
  chart:
    enabled: true
    fullnameOverride: "acme-orders-api"
    nameOverride: "acme-orders-api"
    replicaCount: 2

    # Factor 9: Disposability & zero-downtime rollout
    strategy:
      type: RollingUpdate
      rollingUpdate:
        maxSurge: 1
        maxUnavailable: 0

    # Factor 15: Least-privilege pod hardening
    podSecurityContext:
      runAsNonRoot: true
      runAsUser: 10001
      fsGroup: 10001
      seccompProfile:
        type: RuntimeDefault

    serviceAccount:
      create: true

    # Enable only when the pod actually needs Kubernetes API permissions
    rbac:
      enabled: false

    container:
      # Factor 5: Immutable image with fixed tag
      image: registry.acme.corp/orders-api:2.4.0
      imageConfig:
        pullPolicy: IfNotPresent
      securityContext:
        allowPrivilegeEscalation: false
        readOnlyRootFilesystem: true
        capabilities:
          drop:
            - ALL
      # Factor 7: Port binding
      ports:
        - name: http
          containerPort: 8080
          protocol: TCP
        - name: metrics
          containerPort: 9090
          protocol: TCP
      # Factors 3 & 4: Configuration & backing services decoupled from code
      staticEnv:
        - name: SERVICE_NAME
          value: acme-orders-api
      env:
        - name: DATABASE_HOST
          value: acme-postgres.acme-prod.svc.cluster.local
      envFrom:
        - secretRef:
            name: orders-api-secrets
      resources:
        requests:
          cpu: 100m
          memory: 128Mi
        limits:
          cpu: 500m
          memory: 512Mi
      # Factors 9 & 14: Health checks
      startupProbe:
        httpGet:
          path: /healthz
          port: http
        failureThreshold: 30
        periodSeconds: 5
      livenessProbe:
        httpGet:
          path: /healthz
          port: http
        periodSeconds: 10
      readinessProbe:
        httpGet:
          path: /readyz
          port: http
        periodSeconds: 5

    service:
      type: ClusterIP
      ports:
        - name: http
          port: 80
          targetPort: http
        - name: metrics
          port: 9090
          targetPort: metrics

    # Factor 13: API First via Ingress
    ingressSimple:
      enabled: true
      host: orders.acme.example
      path: /
      pathType: Prefix
      tlsSecretName: acme-orders-tls
      annotations:
        cert-manager.io/cluster-issuer: letsencrypt-prod

    # Factor 14: Prometheus Telemetry
    monitoring:
      - enabled: true
        namespace: monitoring
        release: prometheus
        endpoints:
          - port: metrics
            interval: 30s
            path: /metrics

  # Factors 8 & 15: Additional resources via manifests:
  manifests:
    - apiVersion: autoscaling/v2
      kind: HorizontalPodAutoscaler
      content:
        metadata:
          name: acme-orders-api-hpa
          namespace: acme-prod
        spec:
          scaleTargetRef:
            apiVersion: apps/v1
            kind: Deployment
            name: acme-orders-api
          minReplicas: 2
          maxReplicas: 8
          metrics:
            - type: Resource
              resource:
                name: cpu
                target:
                  type: Utilization
                  averageUtilization: 75

    - apiVersion: networking.k8s.io/v1
      kind: NetworkPolicy
      content:
        metadata:
          name: acme-orders-api-netpol
          namespace: acme-prod
        spec:
          podSelector:
            matchLabels:
              app: acme-orders-api
          policyTypes:
            - Ingress
          ingress:
            - ports:
                - protocol: TCP
                  port: 8080
                - protocol: TCP
                  port: 9090

Portability and Digital Sovereignty

Because ohMyHelm generates strictly standard Kubernetes and Helm resources and is freely available under the MIT License, there is zero vendor lock-in:

  • Standardized artifacts: Every deployment can be rendered into plain Kubernetes YAML via helm template and operated on any CNCF-conformant cluster.
  • GitOps-ready: Declarative values.yaml files work with the Helm CLI, CI/CD pipelines, Argo CD, and Flux (keep the lookup note for Secrets in mind).
  • No proprietary runtime tooling: All you need is standard Helm and the official ohMyHelm Helm repository.

Further Reading