Plain Manifests Helper

Deploy arbitrary Kubernetes resources via the manifests helper — ideal for HPA (autoscaling/v2), NetworkPolicy, PodDisruptionBudget, and CronJob.

Plain Manifests Helper

The root helper manifests (plural!) is ohMyHelm's universal escape hatch. It lets you render arbitrary native Kubernetes resources and Custom Resources (CRDs) directly from your values.yaml — covering anything for which ohMyHelm does not include a dedicated template.

Structure

According to values.schema.json, each element in manifests[] has exactly three required fields (additionalProperties: false):

Field Type Required Description
apiVersion String Yes Kubernetes API version (for example, v1, policy/v1, autoscaling/v2, networking.k8s.io/v1)
kind String Yes Kubernetes resource kind (for example, PodDisruptionBudget, NetworkPolicy, CronJob)
content Object Yes All remaining top-level manifest fields (metadata, spec, data, rules, etc.)

The template omh-helper-plainManifest.yaml outputs apiVersion, kind, and toYaml .content directly as a YAML document. No tpl templating is applied to field contents.

Example 1: HorizontalPodAutoscaler (autoscaling/v2 for Kubernetes ≥ 1.25)

Because chart.autoscaling in the current release still uses autoscaling/v2beta1, manifests: is the recommended way to define HPAs on modern Kubernetes clusters:

manifests:
  - apiVersion: autoscaling/v2
    kind: HorizontalPodAutoscaler
    content:
      metadata:
        name: acme-api-hpa
        namespace: acme-prod
      spec:
        scaleTargetRef:
          apiVersion: apps/v1
          kind: Deployment
          name: acme-api
        minReplicas: 2
        maxReplicas: 10
        metrics:
          - type: Resource
            resource:
              name: cpu
              target:
                type: Utilization
                averageUtilization: 75

Example 2: PodDisruptionBudget (policy/v1)

manifests:
  - apiVersion: policy/v1
    kind: PodDisruptionBudget
    content:
      metadata:
        name: acme-api-pdb
        namespace: acme-prod
      spec:
        minAvailable: 1
        selector:
          matchLabels:
            app: acme-api

Example 3: NetworkPolicy (networking.k8s.io/v1)

manifests:
  - apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    content:
      metadata:
        name: acme-api-allow-ingress
        namespace: acme-prod
      spec:
        podSelector:
          matchLabels:
            app: acme-api
        policyTypes:
          - Ingress
        ingress:
          - from:
              - namespaceSelector:
                  matchLabels:
                    kubernetes.io/metadata.name: ingress-nginx
            ports:
              - protocol: TCP
                port: 8080

Example 4: CronJob (batch/v1)

manifests:
  - apiVersion: batch/v1
    kind: CronJob
    content:
      metadata:
        name: acme-nightly-cleanup
        namespace: acme-prod
      spec:
        schedule: "0 2 * * *"
        concurrencyPolicy: Forbid
        jobTemplate:
          spec:
            template:
              spec:
                restartPolicy: OnFailure
                containers:
                  - name: cleanup
                    image: registry.acme.corp/maintenance:1.2.0
                    args:
                      - "--expire-days=30"

Example 5: Custom Resources (e.g., ExternalSecret or Certificate)

manifests:
  - apiVersion: cert-manager.io/v1
    kind: Certificate
    content:
      metadata:
        name: acme-wildcard-cert
        namespace: acme-prod
      spec:
        secretName: acme-wildcard-tls
        issuerRef:
          name: letsencrypt-prod
          kind: ClusterIssuer
        dnsNames:
          - "app.acme.example"
          - "api.acme.example"

Typical Use Cases for manifests:

  • Standard Kubernetes resources without a dedicated template: PodDisruptionBudget, NetworkPolicy, CronJob, PersistentVolumeClaim, ResourceQuota, LimitRange, ClusterRole, ClusterRoleBinding
  • Workarounds for current chart limitations: HorizontalPodAutoscaler (autoscaling/v2), Ingress with spec.ingressClassName, Namespace with labels/annotations, ServiceMonitor with scheme: https
  • Operator CRDs: ExternalSecret, Certificate, HTTPRoute (Gateway API), PrometheusRule, PodMonitor

Related Pages