Helm Dependencies: Difference between revisions
Line 14: | Line 14: | ||
=How Helm Dependencies Work= | =How Helm Dependencies Work= | ||
Helm does not automatically handle transitive dependencies, in the manner that [[Maven]], for example, does: it is not possible to specify that chart "a" depends on chart "b" | Helm does not automatically handle transitive dependencies, in the manner that [[Maven]], for example, does: it is not possible to specify that chart "a" depends on chart "b", only specify the chart "b" "coordinates" (name, version and repository URL) and expect Helm to pull "b" automatically during the installation process. In this situation. Maven would contact the dependency's repository and pull the artifact. If that artifact had dependencies, specified by coordinates, Maven would recursively pull those as well, Help does not behave like that. It expects instead a chart to '''embed all dependencies it needs, recursively'''. | ||
Revision as of 22:10, 15 December 2019
External
Internal
Overview
Revised for Helm 3
To Deplete
How Helm Dependencies Work
Helm does not automatically handle transitive dependencies, in the manner that Maven, for example, does: it is not possible to specify that chart "a" depends on chart "b", only specify the chart "b" "coordinates" (name, version and repository URL) and expect Helm to pull "b" automatically during the installation process. In this situation. Maven would contact the dependency's repository and pull the artifact. If that artifact had dependencies, specified by coordinates, Maven would recursively pull those as well, Help does not behave like that. It expects instead a chart to embed all dependencies it needs, recursively.
. Intermediate manual steps are required to install a chart that depends on other charts.
If we simply declare the chart "a" as dependent on chart "b" in the dependencies section of the "a"'s Chart and we attempt to install the chart "a", we get this:
Error: found in Chart.yaml, but missing in charts/ directory: b
What happens if a-1.0.0.zip is in a remote repository and does not have its dependencies in charts/?
Dependency Declaration
Dependencies are declared in Chart.yaml 'dependencies' section.
...
dependencies:
- name: # The name of the dependency
version: # The version of the dependency
repository: # Repository URL
...
Example:
...
# 'a' Chart.yaml
dependencies:
- name: b
version: 1.0.0
repository: # Repository URL
...