Validate Helm Image Configuration Patterns
Check image.repository, image.tag, image.pullPolicy, and imagePullSecrets settings in Helm values.yaml against Kubernetes conventions.
Detailed Explanation
Image Configuration in Helm Charts
The image section of a Helm chart's values.yaml is one of the most critical configurations. Incorrect settings here mean your pods will fail to start or may pull unexpected versions.
Correct Pattern
image:
repository: my-registry.io/my-app
pullPolicy: IfNotPresent
tag: "2.1.0"
imagePullSecrets:
- name: my-registry-secret
What the Validator Checks
| Field | Expected Type | Valid Values |
|---|---|---|
image.repository |
string | Any valid container image reference |
image.tag |
string | Specific version (avoid "latest") |
image.pullPolicy |
string | Always, IfNotPresent, Never |
imagePullSecrets |
array | List of secret name objects |
Common Anti-Patterns
Missing tag (defaults to latest):
image:
repository: nginx
# tag not specified - will default to :latest
Numeric tag without quotes:
image:
tag: 1.25 # YAML parses this as number 1.25, not string "1.25"
Wrong pullPolicy casing:
image:
pullPolicy: always # Must be "Always" (capital A)
Best Practices
- Always quote the
tagvalue to prevent YAML type coercion ("1.0"not1.0) - Use
IfNotPresentfor production to reduce pull traffic - Use
Alwaysonly during development or when using mutable tags - Define
imagePullSecretswhen using private registries
Use Case
Validating image settings before deploying to a private cluster where incorrect pullPolicy or missing imagePullSecrets would cause ImagePullBackOff errors.
Try It — Helm Values Validator
Related Topics
Validate a Basic Web App values.yaml
Basic Configuration
Validate Secrets and ConfigMap Patterns in Helm
Advanced Patterns
Validate Kubernetes Resource Limits and Requests
Resource Management
Validate Multi-Container Pod Values
Advanced Patterns
Production Readiness Checklist for Helm Values
Advanced Patterns