Interview Prep/Helm/Helm 3 Architecture & Release Storage

How does `helm upgrade` decide what to change? Explain the three-way merge.

AdvancedConceptHelm 3 Architecture & Release Storage
Answer

Helm 3 compares three inputs for each object: the manifest from the previous release, the live object in the cluster, and the new rendered manifest. It builds a strategic merge patch (JSON merge patch for CRDs) that moves the live state to the new manifest while respecting changes made by others.

Consequences:

  • A field you removed from the chart is removed from the live object, because it existed in the old manifest.
  • A field someone added with kubectl edit that the chart never managed is usually kept.
  • If someone scaled a Deployment manually and the chart value did not change, Helm 3 still resets replicas to the chart value because live differs from the new manifest.

Helm 2 only compared old vs new manifests, which ignored live drift entirely.

All Helm questions Roadmap: Helm

More on Helm 3 Architecture & Release Storage