Chart Mode
Overview of ohMyHelm Chart mode: configure Deployment, StatefulSet, and DaemonSet workloads along with Service, Ingress, RBAC, probes, volumes, and monitoring.
Chart Mode
With chart.enabled: true, ohMyHelm generates a complete application deployment in Kubernetes — including workload, Service, optional Ingress, health checks, volumes, RBAC, Secrets, ConfigMaps, and monitoring.
What Does Chart Mode Generate?
Depending on your configuration, ohMyHelm generates the following resources in the release namespace from the chart: block:
- Workload:
Deployment(default),StatefulSet, orDaemonSet - Service:
v1/Serviceautomatically namedohmyhelm.fullname - ServiceAccount:
v1/ServiceAccount(create: trueby default) - Ingress (optional):
chart.ingressSimplefor a single host orchart.ingressfor complex routing rules - RBAC (optional): namespace-scoped
RoleandRoleBindingviachart.rbac - Multi-Container (optional):
chart.initContainer,chart.sidecar, andchart.extraContainers - Chart Helpers (optional):
chart.secrets,chart.configs,chart.monitoring, andchart.job - Autoscaling (optional):
chart.autoscaling(note the Kubernetes ≥ 1.25 caveat below)
Minimal Configuration
# Chart.yaml
apiVersion: v2
name: acme-service
version: 0.1.0
dependencies:
- name: ohmyhelm
alias: app
repository: https://gitlab.com/api/v4/projects/28993678/packages/helm/stable
version: 1.18.0
# values.yaml
app:
chart:
enabled: true
fullnameOverride: "acme-service"
container:
image: nginxinc/nginx-unprivileged:1.27-alpine
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 250m
memory: 128Mi
service:
type: ClusterIP
ports:
- name: http
port: 80
targetPort: http
protocol: TCP
Choosing the Workload Type
ohMyHelm supports three workload types in Chart mode:
- Deployment (default):
chart.deployment: true,chart.statefulset: false,chart.daemonset: false— ideal for stateless web services, APIs, and workers. - StatefulSet:
chart.statefulset: true(recommended:chart.deployment: false) — for stateful services with stable pod names andstatefulsetVolume.volumeClaimTemplates. - DaemonSet:
chart.daemonset: true(recommended:chart.deployment: false) — for node-local agents such as log collectors or monitoring exporters.
For full details on flag logic, update strategies, and volumes, see Workloads: Deployment, StatefulSet, and DaemonSet.
Configuring Resources and Autoscaling Properly
CPU and Memory Limits (chart.container.resources)
Always define requests and limits directly on the container (or under chart.sidecar.resources):
chart:
enabled: true
container:
image: registry.acme.corp/app:1.2.0
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
HorizontalPodAutoscaler on Kubernetes ≥ 1.25
Ingress in Chart Mode
Simple Ingress (chart.ingressSimple)
For a single host, chart.ingressSimple is all you need. The template automatically routes traffic to the chart Service (ohmyhelm.fullname) and its port named http:
chart:
enabled: true
fullnameOverride: "acme-web"
service:
ports:
- name: http
port: 80
targetPort: http
ingressSimple:
enabled: true
host: web.acme.example
path: /
pathType: Prefix
tlsSecretName: acme-web-tls
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
Advanced Ingress (chart.ingress)
For multiple hosts or paths, use chart.ingress with standard networking.k8s.io/v1 syntax:
chart:
enabled: true
fullnameOverride: "acme-web"
ingress:
enabled: true
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
tls:
- secretName: acme-web-tls
hosts:
- web.acme.example
- api.acme.example
hosts:
- host: web.acme.example
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: acme-web
port:
name: http
- host: api.acme.example
http:
paths:
- path: /v1
pathType: Prefix
backend:
service:
name: acme-web
port:
name: http