Helm Chart requirements.yaml: Difference between revisions
Line 63: | Line 63: | ||
In this case, [[Helm_repo#Add_a_New_Repository|helm repo add]] must be used to add the repository locally before using the dependent chart. | In this case, [[Helm_repo#Add_a_New_Repository|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, as such: | 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: | ||
<syntaxhighlight lang='yaml'> | <syntaxhighlight lang='yaml'> | ||
- name: my-chart | - name: my-chart | ||
Line 69: | Line 69: | ||
repository: file:///tmp/charts/my-chart | repository: file:///tmp/charts/my-chart | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang='yaml'> | |||
- name: my-chart | |||
version: 1.0.0 | |||
repository: file://./../my-chart | |||
</syntaxhighlight> | |||
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 [[Helm_Chart_Chart.yaml|Chart.yaml]]. | 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 [[Helm_Chart_Chart.yaml|Chart.yaml]]. |
Revision as of 23:51, 12 September 2019
External
Internal
Overview
requirements.yaml is an optional metadata file that contains the immediate dependencies for the chart, expressed as a list of name, version and repository URL tuples. Note that the immediate dependencies might have dependencies on their own, which are not expressed in the chart's requirements.yaml file. Helm manages those as well, and after they are discovered, they are written in requirements.lock file. For a general discussion on chart dependencies, see Helm Dependencies.
Structure
dependencies: - name: blue version: 1.2.3 repository: http://example.com/charts alias: something condition: something.enabled, global. something.enabled tags: - front-end - big - name: green version 3.2.1 repository: http://another.example.com/charts
Example
dependencies:
- name: postgresql
version: 6.3.2
repository: https://kubernetes-charts.storage.googleapis.com
requirements.lock
Fields
name
The dependency chart name.
version
The dependency chart version.
repository
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.
alias
TODO: https://helm.sh/docs/developing_charts/#alias-field-in-requirements-yaml
condition
TODO:https://helm.sh/docs/developing_charts/#tags-and-condition-fields-in-requirements-yaml
tags
TODO: https://helm.sh/docs/developing_charts/#tags-and-condition-fields-in-requirements-yaml