Set value in dependency of Helm chart
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
When a Helm chart depends on another chart, the parent chart can override values inside that dependency. The key is using the dependency name, or alias, as the prefix in the parent values.yaml or via --set. Once that structure is clear, nested chart configuration becomes predictable instead of trial and error.
Understand How Dependency Values Are Namespaced
Assume your parent chart declares a dependency in Chart.yaml:
Values for that dependency live under the dependency name in the parent chart's values:
That tells Helm to render the child chart using redis.auth.enabled=false.
The same rule applies from the command line:
If you remember only one rule, remember this one: child values are set under the child chart key.
Use the Alias If the Dependency Has One
If the dependency is declared with an alias, the alias becomes the key you must use in values.
Now the override moves from redis to cache:
That catches many people because the child chart is still redis, but the parent values key is now cache.
Inspect the Child Chart Values Before Overriding
The safest way to set a dependency value is to inspect the child chart's own values.yaml and mirror its structure under the dependency key.
For example, if the dependency defines:
then the parent override must preserve that internal shape:
Guessing field names is the fastest way to end up with overrides that render successfully but do nothing.
Use global Only for Values Meant to Be Shared
Helm also supports global values, which can be read by subcharts if those subcharts are written to use them.
This is useful for cross-chart conventions such as image registries, pull secrets, or common labels. It is not a substitute for normal child-specific configuration. If a dependency does not read global.someKey, setting it there will have no effect.
In other words, global works only when the chart author intentionally uses it.
Verify Overrides with helm template
Do not trust a values override until you render the manifests and inspect the output.
This lets you verify whether the child chart actually received the expected settings. It is especially useful when:
- the dependency uses aliases
- the child chart nests values deeply
- several values files are merged together
- a command-line
--setis overriding a file value unexpectedly
Rendered output is the ground truth.
Handle Nested Lists and Special Characters Carefully
Command-line overrides become fragile when the path includes lists or values with commas and dots. In those cases, a values file is usually safer than a long --set expression.
Simple example:
Once the structure gets complex, move the override into YAML and commit it as configuration. That makes reviews easier and avoids shell escaping bugs.
Common Pitfalls
- Using the dependency package name when the parent chart declared an alias.
- Writing child overrides at the top level instead of under the dependency key.
- Assuming
globalvalues work automatically for every subchart. - Setting a path that does not match the child chart's real
values.yamlstructure. - Trusting
--setblindly without checking the rendered manifests.
Summary
- Set dependency values under the dependency name or alias in the parent chart.
- Mirror the child chart's own values structure exactly.
- Use aliases consistently because they change the override path.
- Reserve
globalfor values the child chart is explicitly built to consume. - Validate the result with
helm templatebefore assuming the override worked.
Related reading
- setting image pull policy using kubectl
- Setting up Kubernetes on NixOS
- Setup Kubernetes Pods via API Call using Go and Operator SDK
- Setup securityContext inside kubernetes deployment
- Setting up MySQL and importing dump within Dockerfile
- sh 1 react-scripts not found In Docker
- Setting a log file name to include current date in Log4j
- Setting queueSize parameter for ch.qos.logback.classic.AsyncAppender

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.