Helm Chart pass variable to dependency
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
To pass values to a Helm dependency chart, nest them under the dependency's name in your parent chart's values.yaml. If your parent chart depends on redis, put Redis-specific values under a redis: key. Helm merges these values into the dependency chart's own values during rendering. You can also use global: values that are shared across all charts, or import-values to pull specific values from a dependency into the parent.
Defining Dependencies
Passing Values to Dependencies
Values go under the dependency name in the parent's values.yaml:
Everything under redis: is passed directly to the Redis chart as if it were that chart's own values.yaml. Check the dependency chart's documentation for available values.
Using Global Values
Global values are accessible from any chart in the dependency tree:
Inside any template (parent or dependency), access globals with:
Overriding at Install Time
Using import-values
Pull values from a dependency into the parent chart's namespace:
Aliased Dependencies
Use the same chart multiple times with different configurations:
Each alias gets its own configuration namespace.
Conditional Dependencies
Accessing Dependency Values in Parent Templates
Service names follow the pattern <release-name>-<dependency-name>. Check the dependency chart's NOTES.txt or templates for exact naming.
Debugging Values
Common Pitfalls
- Wrong nesting level: Values must be nested under the exact dependency name (or alias).
redis.auth.passwordis correct;auth.passwordat the root level does not reach the Redis chart. - Forgetting
helm dependency update: After changingChart.yamldependencies, runhelm dependency updateto download the new charts. Without this, Helm uses stale or missing chart versions. - Global values not supported by all charts: Not every chart reads
global.*values. Check the dependency chart'svalues.yamland templates to see if it uses.Values.global. - Alias vs name: When using
alias, values go under the alias name, not the chart name.alias: redis-cachemeans values go underredis-cache:, notredis:. - Version constraints:
version: "17.x.x"uses semver ranges. Runninghelm dependency updatemay pull a new minor/patch version with different value names. Pin exact versions for production.
Summary
- Nest dependency values under the dependency name in
values.yaml(e.g.,redis:) - Use
global:for values shared across parent and all dependency charts - Use
--set redis.auth.password=secretto override dependency values at install time - Use
aliasto install the same dependency chart multiple times with different configs - Use
conditionto make dependencies optional (enable/disable at install time) - Always run
helm dependency updateafter modifyingChart.yaml
Related reading
- Helm chart passing multiple environment values for single key
- Helm Chart will install manually, will not install via Terraform
- Helm charts and Ingress resources
- Helm configmap error Error UPGRADE FAILED ConfigMap my-service.v130 is invalid data Too long must have at most 1048576 characters
- Helm how to define .Release.Name value
- Helm Incompatible versions between client and server
- helm error Error This command needs 2 arguments release name, chart path
- helm error when updating UPGRADE FAILED The order in patch list

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.