| name | helm-chart-review |
| description | Conduct comprehensive Helm chart security and quality audits with automated checks for security contexts, resource limits, and production readiness. Use when reviewing pull requests with Helm chart changes, conducting pre-release chart audits, security scanning Helm manifests, validating chart structure and best practices, or preparing charts for production deployment. |
| version | 1.0.0 |
Helm Chart Review
Purpose
Provide comprehensive review checklists and automated validation for ensuring Helm charts meet production quality and security standards before deployment.
Complete Review Workflow
Step 1: Run Automated Validation
helm lint ./charts/mychart
helm template mychart ./charts/mychart --debug
helm template mychart ./charts/mychart -f values-prod.yaml
helm install test ./charts/mychart --dry-run --debug --namespace test
Step 2: Security Review Checklist
Critical security items (must pass):
Security red flags:
securityContext:
privileged: true
runAsUser: 0
allowPrivilegeEscalation: true
image:
tag: latest
password: "hardcoded123"
Step 3: Structure Review Checklist
Step 4: Values Review Checklist
Good vs bad values:
replicaCount: 2
image:
repository: myapp
pullPolicy: IfNotPresent
tag: ""
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 250m
memory: 128Mi
replicas: 1
ImageTag: latest
database:
password: "changeme"
Step 5: Template Review Checklist
Template quality patterns:
metadata:
name: {{ include "mychart.fullname" . }}
labels:
{{- include "mychart.labels" . | nindent 4 }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- if .Values.ingress.enabled }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
name: my-app-{{ .Release.Name }}
image: {{ .Values.image }}
{{ }}
Step 6: Testing Review Checklist
Security Scanning Integration
Kubesec Analysis
helm template mychart ./charts/mychart | kubesec scan -
Trivy Image Scanning
helm template mychart ./charts/mychart | grep "image:" | sort -u
trivy image myapp:1.0.0
Common Review Findings and Fixes
Finding: Missing Resource Limits
containers:
- name: app
image: myapp:1.0
containers:
- name: app
image: myapp:1.0
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 250m
memory: 128Mi
Finding: Insecure Security Context
securityContext: {}
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
Finding: Latest Image Tag
image: myapp:latest
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Finding: No Liveness/Readiness Probes
containers:
- name: app
image: myapp:1.0
containers:
- name: app
image: myapp:1.0
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: http
initialDelaySeconds: 5
periodSeconds: 5
Review Severity Levels
BLOCKER (must fix before merge):
- Hardcoded secrets
- Missing security contexts
- Privileged containers
- No resource limits
- Use of
:latest tag
CRITICAL (must fix before production):
- Missing liveness/readiness probes
- Single replica without PDB
- No pod disruption budget
- Incorrect RBAC (too permissive)
MAJOR (should fix):
- Undocumented values
- Missing tests
- Incomplete README
- No CHANGELOG entry
MINOR (nice to have):
- Improved comments
- Additional examples
- Optimization opportunities
Pre-Release Checklist
Before releasing chart:
CI/CD Quality Gates
Example pipeline checks:
helm-lint:
stage: test
script:
- helm lint ./charts/*
helm-unittest:
stage: test
script:
- helm unittest ./charts/*
helm-security-scan:
stage: test
script:
- helm template ./charts/* | kubesec scan -
- helm template ./charts/* | trivy config -
helm-dry-run:
stage: test
script:
- helm install test ./charts/mychart --dry-run --debug
Documentation Review
README.md must include:
CHANGELOG.md must track:
Resources
Related Agent
For comprehensive Helm/Kubernetes guidance that coordinates this and other Helm skills, use the helm-kubernetes-expert agent.