What is `Chart.lock` and why commit it?
BeginnerConceptDependencies, Subcharts & Library Charts
Answer
It records the exact resolved version of each dependency plus a digest of the dependency definitions. With version ranges like 16.x.x in Chart.yaml, two builds a week apart could pull different subchart versions; helm dependency build from the lock makes builds reproducible, the same role as package-lock.json. If Chart.yaml changes, Helm detects the digest mismatch and asks you to run update.
More on Dependencies, Subcharts & Library Charts
How do you declare a chart dependency in Helm 3?BeginnerWhat is the difference between `helm dependency update` and `helm dependency build`?IntermediateHow does `condition` work on a dependency?BeginnerWhat are `tags` on dependencies?IntermediateWhat does `alias` do on a dependency?IntermediateWhat is `import-values`?Advanced