Helm Chart requirements.yaml

From NovaOrdis Knowledge Base
Revision as of 21:05, 5 February 2022 by Ovidiu (talk | contribs) (→‎Internal)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search




The requirements.yaml file was deprecated in Helm 3 and replaced with the Chart.yaml 'dependencies' element.

requirements.yaml is an optional metadata file that contains the immediate dependencies for the chart, expressed as a list of chart "coordinates": name, version and repository URL. Note that the immediate dependencies might have dependencies on their own, which are not explicitly specified in the chart's requirements.yaml file, but implied. For an in-depth discussion on how Helm dependencies work, see:

How Helm Dependencies Work


- name: blue
  version: 1.2.3
  repository: http://example.com/charts
  alias: something
  condition: something.enabled, global. something.enabled
  - front-end
  - big    
- name: green
  version 3.2.1
  repository: http://another.example.com/charts


  - name: postgresql
    version: 6.3.2
    repository: https://kubernetes-charts.storage.googleapis.com


Transitive Dependencies and requirements.lock File



The dependency chart name. The name must match the name in the chart's Chart.yaml file.


The dependency chart version. It could be a version or a version range.


The dependency chart repository full URL.

The most common case is to specify an on-line repository, as such:

- name: postgresql
    version: 6.3.2
    repository: https://kubernetes-charts.storage.googleapis.com

In this case, helm repo add must be used to add the repository locally before using the dependent chart.

However, we can refer to dependencies that exist on the local filesystem, using an absolute path file URL or a relative path URL, as such:

- name: my-chart
    version: 1.0.0
    repository: file:///tmp/charts/my-chart
- name: my-chart
    version: 1.0.0
    repository: file://../my-chart

Note that when a relative path is used, it is considered relative to the dependent chart root directory.

In case the dependency chart is not archived, but exist as an exploded directory on the file system, the file:// URL must point to the root directory of the chart - the one that contains Chart.yaml.

If the dependency chart is retrieved locally, it is not required to have the repository added to helm by helm repo add.