Ten service charts copy the same `_helpers.tpl`. A security fix to labels is needed everywhere. What do you build?
IntermediateScenarioDependencies, Subcharts & Library Charts
Answer
Situation read → Copy-paste helpers mean ten PRs per fix.
What I'd do →
- Create a library chart
shacklib(type: library) withshacklib.labels,shacklib.deployment,shacklib.serviceand security defaults. - Publish it to the OCI registry with SemVer.
- Each service chart adds it as a dependency and replaces its templates with
{{ include "shacklib.deployment" . }}. - Renovate or Dependabot opens PRs to bump the library version across services.
Why → One versioned source for shared logic, rolled out like any dependency.
Interview tip → Mention automated dependency bumps to close the loop.
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`?IntermediateWhat is `Chart.lock` and why commit it?BeginnerHow does `condition` work on a dependency?BeginnerWhat are `tags` on dependencies?IntermediateWhat does `alias` do on a dependency?Intermediate