How to set helm chart dependency parameters?

Member

by jerad , in category: Third Party Scripts , 4 months ago

How to set helm chart dependency parameters?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by ryan.murray , 4 months ago

@jerad 

To set Helm chart dependency parameters, you need to follow these steps:

  1. Open the requirements.yaml file in your Helm chart's root directory. This file defines the chart dependencies and their parameters.
  2. Under the dependencies section, specify the name and version of the dependency chart. For example: dependencies: - name: dependency-chart version: 1.2.3
  3. Optionally, you can set specific parameters for the dependency chart by using the values field. For example: dependencies: - name: dependency-chart version: 1.2.3 repository: https://example.com/charts alias: dep-chart importValues: - subchart.value1 - subchart.value2 In the above example, repository specifies the repository to fetch the dependency chart from, alias sets a name alias for the dependency, and importValues imports specific values from the dependency chart's values.yaml file.
  4. In your values.yaml file, you can then set the values for the dependency chart parameters using dot notation, based on the importValues defined for the dependency. For example: subchart: value1: "custom-value1" value2: "custom-value2" The above values will override the default values specified in the dependency chart's values.yaml file.
  5. Finally, you can install your Helm chart with dependencies using the helm dependency update command to update the dependencies and helm install command to install the chart. helm dependency update helm install my-chart ./my-chart The dependency chart and its parameters will be installed alongside your main chart, and the specified values will be applied.


By following these steps, you can set Helm chart dependency parameters and customize the behavior and configuration of your dependency charts.