Helm dependency: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 14: Line 14:
=Dependency Update=
=Dependency Update=


helm dependency update
Execute the following in the directory containing the chart:
<syntaxhighlight lang='bash'>
helm dependency update
</syntaxhighlight>
 
<syntaxhighlight lang='bash'>
helm dep up
</syntaxhighlight>


helm dep up
Alternatively, the command can be executed specifying the chart directory:
<syntaxhighlight lang='bash'>
helm dependency update ./charts/my-chart
</syntaxhighlight>


When this command retrieves charts, it will store them as chart archives in the [[Helm_Concepts#charts.2F_Directory|charts/]] directory of the dependent chart:
When this command retrieves charts, it will store them as chart archives in the [[Helm_Concepts#charts.2F_Directory|charts/]] directory of the dependent chart:
Line 35: Line 45:
As result, postgresql-6.3.2.tgz is placed into the dependent chart's charts/ directory.
As result, postgresql-6.3.2.tgz is placed into the dependent chart's charts/ directory.


The command recreates [[Helm_Dependencies#Transitive_Dependencies_and_requirements.lock_File|requirements.lock]].
The command recreates [[Helm Chart requirements.lock|requirements.lock]]. If requirements.yaml changes, Helm will notice that the file changes and will update requirements.lock to reflect those changes.


For more details on how transitive dependencies are handled, see {{Internal|Helm_Dependencies#Transitive_Dependencies|Transitive Dependencies}}
For more details on how transitive dependencies are handled, see: {{Internal|Helm_Dependencies#Transitive_Dependencies|Transitive Dependencies}}

Latest revision as of 03:45, 16 October 2020

External

Internal

Overview

The helm dependency command operates on requirements.yaml file, with the aim of maintaining the content of the charts/ subdirectory in sync with requirements.yaml. For an in-depth discussion on how Helm dependencies work, see:

How Helm Dependencies Work

Dependency Update

Execute the following in the directory containing the chart:

helm dependency update
helm dep up

Alternatively, the command can be executed specifying the chart directory:

helm dependency update ./charts/my-chart

When this command retrieves charts, it will store them as chart archives in the charts/ directory of the dependent chart:

helm dependency update postgresql-dynamic-dependency/
Hang tight while we grab the latest from your chart repositories...
...Unable to get an update from the "local" chart repository (http://127.0.0.1:8879/charts):
	Get http://127.0.0.1:8879/charts/index.yaml: dial tcp 127.0.0.1:8879: connect: connection refused
...Successfully got an update from the "incubator" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete.
Saving 1 charts
Downloading postgresql from repo https://kubernetes-charts.storage.googleapis.com
Deleting outdated charts

As result, postgresql-6.3.2.tgz is placed into the dependent chart's charts/ directory.

The command recreates requirements.lock. If requirements.yaml changes, Helm will notice that the file changes and will update requirements.lock to reflect those changes.

For more details on how transitive dependencies are handled, see:

Transitive Dependencies