Validate Helm Image Configuration Patterns

Check image.repository, image.tag, image.pullPolicy, and imagePullSecrets settings in Helm values.yaml against Kubernetes conventions.

Basic Configuration

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 tag value to prevent YAML type coercion ("1.0" not 1.0)
  • Use IfNotPresent for production to reduce pull traffic
  • Use Always only during development or when using mutable tags
  • Define imagePullSecrets when 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

Open full tool