Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
358 views
in Technique[技术] by (71.8m points)

kubernetes - List helm dependencies of an installed chart

Helm offers the option of listing dependencies for a chart when browsing through its files.

So if I am above the folder of my-chart, I can perform

? helm dependency list my-chart
NAME    VERSION REPOSITORY          STATUS
common  0.12.6  file://../common/   ok

How can I get the dependencies for the INSTALLED chart, i.e. by retrieving this info from the actualy deployed version? (i.e. the one running on my cluster)

question from:https://stackoverflow.com/questions/66062090/list-helm-dependencies-of-an-installed-chart

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

No, you can retrieve this information only using documentation you provided. You should:

  • Download the chart with $ helm pull repo/name --untar (skip this if you already have it)
  • Go inside the chart directory
  • Invoke command: $ helm dependency list my-chart

Alternatively you can inspect requirements.yaml for helm2 or Chart.yaml for helm3, but you will find there only transitive dependencies :

All applications, maybe with the exception of the most trivial, usually depend on other runtime components, such as web servers, caches, databases, etc. Helm supports modularization via a dependency mechanism, which allows to formally specify, manage and deploy dependencies as part of a Helm release. A Helm chart may declare dependencies, which are other Helm charts published in external repositories, conveniently packaged by people who presumably know the respective components well. The simples possible example is a chart A -- the dependent - that declared its reliance on a chart B - the dependency - by specifying chart B's “coordinates” (name, version and repository URL) as part of its own metadata. The exact way in which the dependencies are declared has evolved across Helm releases. For Helm 2 charts, the dependencies are declared in a dedicated requirements.yaml file, while for Helm 3 chart, the dependencies are declared as part of the chart manifest Chart.yaml. However, the way the dependencies are processed during installation has remained the same.

Good article: Helm Dependencies


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...