From bff5261715d01634cbe317bb8bb12fbb04e8d5c3 Mon Sep 17 00:00:00 2001 From: Neil Moore Date: Wed, 25 Oct 2017 15:53:23 +0100 Subject: [PATCH 1/2] Update charts.md --- docs/charts.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/charts.md b/docs/charts.md index 81c3d44f5..714f0cc3e 100644 --- a/docs/charts.md +++ b/docs/charts.md @@ -449,6 +449,40 @@ directory. **TIP:** _To drop a dependency into your `charts/` directory, use the `helm fetch` command_ +### Operational aspects of using dependencies + +The above sections explain how to specify chart dependencies, but how does this affect +chart installation using `helm install` and `helm upgrade`? + +Suppose that a chart named "A" creates the following Kubernetes objects + +- namespace "A-Namespace" +- statefulset "A-StatefulSet" +- service "A-Service" + +A is dependent on chart B that creates objects + +- namespace "B-Namespace" +- replicaset "B-ReplicaSet" +- service "B-Service" + +After installation/upgrade of chart A a single Helm release is created. The release will +create all the above Kubernetes objects in the following order: + +- A-Namespace +- B-Namespace +- A-StatefulSet +- B-ReplicaSet +- A-Service +- B-Service + +This is because the Kubernetes objects from all the charts are aggregrated into a single set; then sorted +by type followed by name; and then created/updated in that order. Hence a single release is created +with all the objects for the chart and its dependencies. + +The install order of types is given by the enumeration InstallOrder in kind_sorter.go +(see [the Helm source file](https://github.com/kubernetes/helm/blob/master/pkg/tiller/kind_sorter.go#L26). + ## Templates and Values Helm Chart templates are written in the From 7888f54adbcae71f088ea1219d87c8faaf0ca149 Mon Sep 17 00:00:00 2001 From: Neil Moore Date: Wed, 25 Oct 2017 15:56:34 +0100 Subject: [PATCH 2/2] Update charts.md --- docs/charts.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/charts.md b/docs/charts.md index 714f0cc3e..42aa6c1d7 100644 --- a/docs/charts.md +++ b/docs/charts.md @@ -460,14 +460,14 @@ Suppose that a chart named "A" creates the following Kubernetes objects - statefulset "A-StatefulSet" - service "A-Service" -A is dependent on chart B that creates objects +Furthermore, A is dependent on chart B that creates objects - namespace "B-Namespace" - replicaset "B-ReplicaSet" - service "B-Service" -After installation/upgrade of chart A a single Helm release is created. The release will -create all the above Kubernetes objects in the following order: +After installation/upgrade of chart A a single Helm release is created/modified. The release will +create/update all of the above Kubernetes objects in the following order: - A-Namespace - B-Namespace @@ -476,11 +476,16 @@ create all the above Kubernetes objects in the following order: - A-Service - B-Service -This is because the Kubernetes objects from all the charts are aggregrated into a single set; then sorted -by type followed by name; and then created/updated in that order. Hence a single release is created -with all the objects for the chart and its dependencies. +This is because when Helm installs/upgrades charts, +the Kubernetes objects from the charts and all its dependencies are -The install order of types is given by the enumeration InstallOrder in kind_sorter.go +- aggregrated into a single set; then +- sorted by type followed by name; and then +- created/updated in that order. + +Hence a single release is created with all the objects for the chart and its dependencies. + +The install order of Kubernetes types is given by the enumeration InstallOrder in kind_sorter.go (see [the Helm source file](https://github.com/kubernetes/helm/blob/master/pkg/tiller/kind_sorter.go#L26). ## Templates and Values