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 editthat the chart never managed is usually kept. - If someone scaled a Deployment manually and the chart value did not change, Helm 3 still resets
replicasto the chart value because live differs from the new manifest.
Helm 2 only compared old vs new manifests, which ignored live drift entirely.
More on Helm 3 Architecture & Release Storage
What is Helm, in one sentence?BeginnerDefine chart, release, revision and repository.BeginnerWhat was Tiller and why was it removed in Helm 3?BeginnerWhere does Helm 3 store release information?BeginnerWhat is inside a release Secret and how do you decode it?AdvancedWhat storage drivers does Helm support and how do you switch?Advanced