Shared dependencies with HELM
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
Helm dependencies let one chart reuse other charts instead of copying templates into every service repository. In practice, "shared dependencies" usually means platform-wide charts for components like Redis, ingress configuration, or common template helpers that many applications consume together.
Declare dependencies in Chart.yaml
In modern Helm, dependencies are declared directly in the parent chart’s Chart.yaml.
This tells Helm which child charts must be resolved before the parent chart can be rendered or installed.
Once declared, fetch them with:
That command downloads the dependencies and updates Chart.lock, which records the exact versions used.
Use Chart.lock for reproducible builds
Shared dependencies become risky when teams update them casually. If one developer runs helm dependency update and another does not, the rendered manifests can drift even when the parent chart code looks unchanged.
For reproducible builds:
- resolve dependencies intentionally
- commit
Chart.lock - use
helm dependency buildin CI
build uses the lock file rather than resolving fresh versions again. That is important when many services rely on the same internal shared charts.
Override subchart values from the parent
A parent chart configures a dependency by placing values under the dependency name.
This keeps the dependency reusable while still letting the parent chart choose environment-specific behavior.
Helm also supports global values when several subcharts need access to the same setting:
Use global sparingly. It is useful for true cross-chart concerns, but overusing it makes configuration harder to reason about.
Make shared dependencies optional
Some dependencies should only be active in certain deployments. Helm supports this through condition and tags.
This is a common pattern when development environments run an internal Redis chart, while production points to a managed external Redis service instead.
Know when to use a library chart
Not every shared dependency should render Kubernetes resources. If the goal is only to share helper templates, naming conventions, labels, or common snippets, a library chart is often the better choice.
Application chart:
- renders resources such as Deployments and Services
- can be installed directly
Library chart:
- provides reusable templates
- is consumed by other charts
- does not render standalone manifests on its own
Choosing the wrong type creates confusion. A shared helper chart should not unexpectedly deploy extra objects into every release.
Treat shared charts like platform APIs
When dozens of application charts depend on the same internal chart, that shared chart becomes a contract. Breaking changes ripple through the fleet quickly.
Good dependency hygiene includes:
- semantic versioning
- release notes for breaking changes
- staged rollout through a few services first
- render tests such as
helm templatein CI
Rendering before deployment is especially important when a shared chart changes labels, selectors, or default values in a way that affects resources indirectly.
Common Pitfalls
The biggest mistake is running helm dependency update casually and committing the result without reviewing the manifest impact. A shared dependency upgrade can change far more than the parent chart diff suggests.
Another issue is overriding too much of a subchart. If a parent chart has to replace most of a dependency’s behavior, that dependency is probably the wrong abstraction or needs a clearer interface.
Teams also misuse global values as a dumping ground for unrelated settings. That makes chart boundaries blurry and creates configuration coupling across dependencies that should remain independent.
Finally, do not ignore Chart.lock. Without it, repeated installs of the same chart can resolve to different dependency versions over time, which makes debugging rollout differences much harder.
Summary
- Declare shared Helm dependencies in
Chart.yamland resolve them intentionally. - Commit
Chart.lockso builds and deployments remain reproducible. - Override subchart behavior under the dependency name and use
globalvalues carefully. - Use library charts for shared template logic that should not render standalone resources.
- Treat internal shared charts as versioned platform contracts, not casual template collections.
Related reading
- Should dependencies between Helm charts reflect dependencies between microservices?
- Show metrics in Grafana from the Kubernetes Pod that was scraped last by Prometheus
- sidecar vs init container in kubernetes
- Skaffold syncs files but pod doesn't refresh
- Ship an application with a database
- Should I always create my DynamoDB tables using hash and range primary key type?
- Skipping service no endpoints found when attempting to fetch certificate with traefik 2 cert-manager http-01 challenge
- Slow wordpress in eks cluster

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.