Helm values and rollback

  • Trace current image-version ownership and render values-driven image/artifact identities with explicit rollback limits.
100%
Helm: image values, rendered workloads and rollbackSelect / build / gateRollback / failureCopy / mount fileschart + defaultsR1 valuesR2 overridepreview refs onlyread exact pathsprior release recordrestore image / path refsmust still existChart.yaml version identifies the chart package; appVersion is informational. Keep the actual chart package with effective values. Chart creation or template rendering alone does not establish installed Helm release history.CHART PACKAGEversion 0.1.0R1 fixture overrides values.yaml app digest/tag and releasePath. The image helper reads app and verifier identity from values; digest wins over tag.R1 FIXTUREApp digest 333…V1 + R1 pathsR2 retains compatible common/V1 and changes app digest plus release path. The worked chart selects exact read-only subPaths; publication and compatibility must be complete before release.R2 FIXTUREApp digest 444…V1 + R2 pathsLocal Helm template renders the same chart with R1, R2 and recorded R1 fixture values, without installing them. This deterministic local test does not create Helm release history or execute actual rollback. The stored-manifest branch below is separate.OFFLINE RENDERR1 / R2 / R1Compare referencesUpper offline rendering previews these desired references only. The separate actual rollback branch restores the prior recorded resource definitions. When applied, the verifier init reads exact paths and blocks app startup if verification fails. It does not publish missing files or reverse database changes; custom images/launcher/verifier are prerequisites.WORKLOAD REFSApp / init imagesArtifact pathsKeep common/V1, releases/R1, releases/R2 and image digests through the active/rollback window. Helm resource rollback cannot recreate deleted/overwritten artifact bytes or unavailable image content.RETAINED SETV1 + R1 + R2Files / imagesActual rollback requires a prior revision in real Helm-managed release history. Chart files and the offline rendering fixtures do not establish that history. Helm 3.19 selects the prior recorded chart/config/manifest/hooks. Argo CD rendering/reconciliation has independent ownership; inspect the actual writer.STORED R1Manifest + chartvalues / hooksActual Helm-managed rollback applies the prior stored manifest and creates a new release revision. It bypasses the current chart rendering and the offline R1/R2 values fixtures above. Successful recovery still requires retained registry digests, artifact files, usable storage and compatible data/schema. This diagram does not claim an installed release or executed rollback.HELM ROLLBACKApply prior storedresource definitionschart + defaultsR1 valuesR2 overridepreview refs onlyread exact pathsprior release recordrestore image / pathrefsmust still exist

Select a component to trace its direct connections. Drag to pan · Ctrl + wheel or pinch to zoom.

  • Upper branch — offline test: render R1 → R2 → recorded R1 fixture values with the same chart; compare references. This creates no release history and performs no cluster action.
  • Lower branch — actual Helm-managed rollback: select a real prior release record and apply its stored resource definitions directly. This branch bypasses the current-chart render and values fixtures, restoring image/path references as a new release revision.
  • External boundary: registry digests, retained PV files and compatible database/schema must still exist. Argo CD sync ownership is separate from Helm release history.
Image selection and release rollback

Image selection and release rollback

Helm 3

Who selects the image

  • CI/CD selects the application and init image versions while generating the Deployment template. Helm supplies the registry and environment when it renders that template.
  • A tag override only affects an image field that reads it. In the worked chart, each component takes its own repository, tag and optional digest from values.yaml. The helper uses the digest when supplied.
Default image and artifact valuesyaml
# ILLUSTRATIVE identities; example.invalid and repeated-digit digests do not run.
# Values own all image versions; templates contain no image tag/digest literals.
replicaCount: 1
images:
  app:
    repository: example.invalid/obrh/consumer
    tag: "r1"
    digest: "sha256:3333333333333333333333333333333333333333333333333333333333333333"
  verifier:
    repository: example.invalid/obrh/artifact-verifier
    tag: "v1"
    digest: "sha256:1111111111111111111111111111111111111111111111111111111111111111"
artifacts:
  claimName: prepared-artifacts
  commonPath: common/V1
  releasePath: releases/R1
# Prerequisite: publication/compatibility gate approved these immutable paths.
# The custom verifier image supplies verify-release; this chart does not publish.
runtime:
  uid: 10001
  gid: 10001
Select a digest or taggotemplate
{{/* Digest wins over the human-readable tag. Empty digest demonstrates tag mode. */}}
{{- define "atlasReview.image" -}}
{{- $repo := required "image repository is required" .repository -}}
{{- if .digest -}}
{{- printf "%s@%s" $repo .digest -}}
{{- else -}}
{{- printf "%s:%s" $repo (required "image tag or digest is required" .tag) -}}
{{- end -}}
{{- end -}}

Follow one upgrade

Input R1 R2
Application Image pinned to the R1 digest Image pinned to the R2 digest
Common files common/V1 Reuse compatible common/V1
Release files releases/R1 Mount releases/R2
  • The verifier init container and application mount the selected files read-only. The application prepares its writable state separately.
  • Keep the chart package and effective values together. The chart version identifies the template package. appVersion describes the application. The rendered Deployment selects the image.
R1 valuesyaml
# Recorded R1 override fixture. Unspecified keys inherit this chart's values.yaml.
images:
  app:
    tag: "r1"
    digest: "sha256:3333333333333333333333333333333333333333333333333333333333333333"
artifacts:
  commonPath: common/V1
  releasePath: releases/R1
R2 valuesyaml
# R2 reuses compatible common/V1; app and release-specific files change together.
images:
  app:
    tag: "r2"
    digest: "sha256:4444444444444444444444444444444444444444444444444444444444444444"
artifacts:
  commonPath: common/V1
  releasePath: releases/R2
Deployment image and volume bindingsyaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}-consumer
  labels:
    app.kubernetes.io/name: {{ .Release.Name }}-consumer
    helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | quote }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      app.kubernetes.io/name: {{ .Release.Name }}-consumer
  template:
    metadata:
      labels:
        app.kubernetes.io/name: {{ .Release.Name }}-consumer
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: {{ .Values.runtime.uid }}
        runAsGroup: {{ .Values.runtime.gid }}
        fsGroup: {{ .Values.runtime.gid }}
      initContainers:
        - name: verify-published-release
          image: {{ include "atlasReview.image" .Values.images.verifier | quote }}
          imagePullPolicy: IfNotPresent
          command: ["/opt/obrh/bin/verify-release"]
          args: ["/published/common", "/published/release"]
          securityContext:
            readOnlyRootFilesystem: true
            allowPrivilegeEscalation: false
          volumeMounts:
            - name: artifacts
              mountPath: /published/common
              subPath: {{ required "commonPath is required" .Values.artifacts.commonPath | quote }}
              readOnly: true
            - name: artifacts
              mountPath: /published/release
              subPath: {{ required "releasePath is required" .Values.artifacts.releasePath | quote }}
              readOnly: true
      containers:
        - name: consumer
          image: {{ include "atlasReview.image" .Values.images.app | quote }}
          imagePullPolicy: IfNotPresent
          command: ["/opt/obrh/bin/launch-prepared.sh"]
          env:
            - name: COMMON_ROOT
              value: /artifacts/common
            - name: RELEASE_ROOT
              value: /artifacts/release
          securityContext:
            readOnlyRootFilesystem: true
            allowPrivilegeEscalation: false
          volumeMounts:
            - name: artifacts
              mountPath: /artifacts/common
              subPath: {{ .Values.artifacts.commonPath | quote }}
              readOnly: true
            - name: artifacts
              mountPath: /artifacts/release
              subPath: {{ .Values.artifacts.releasePath | quote }}
              readOnly: true
            - name: local
              mountPath: /local
            - name: tmp
              mountPath: /tmp
      volumes:
        - name: artifacts
          persistentVolumeClaim:
            claimName: {{ .Values.artifacts.claimName | quote }}
        - name: local
          emptyDir: {}
        - name: tmp
          emptyDir: {}
Chart metadatayaml
apiVersion: v2
name: atlas-release-review
description: Local rendering example for pinned images and retained artifact paths
type: application
version: 0.1.0
appVersion: "teaching-app-1"

What rollback can restore

  • For a Helm-managed release, identify the prior revision with helm history RELEASE. Helm rollback applies its recorded resource definitions and creates a new release revision.
  • For an Argo CD–managed application using Helm rendering, revert the desired version in Git and reconcile it.
Failure after promotion Recovery depends on
Wrong image or artifact path Prior Deployment references and their retained image digests and files.
Incompatible database migration A data/schema contract the old application can use.
Damaged release files or unavailable storage Verified artifact contents and an accessible volume before consumers start.
  • Rendering the same chart with R1, R2 and R1 values exercises image and path selection offline. A live rollback additionally requires retained Helm release history.