From a39ccc059c84f14d74f013474a53c899f826f335 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Thu, 18 Oct 2018 11:21:07 +0100 Subject: [PATCH] Update comments after review - https://github.com/helm/helm/pull/4788#discussion_r226037034 - https://github.com/helm/helm/pull/4788#discussion_r226037064 - https://github.com/helm/helm/pull/4788#discussion_r226037806 - https://github.com/helm/helm/pull/4788#discussion_r226038492 - https://github.com/helm/helm/pull/4788#discussion_r226039202 - https://github.com/helm/helm/pull/4788#discussion_r226039894 Signed-off-by: Martin Hickey --- docs/architecture.md | 2 +- docs/chart_best_practices/conventions.md | 18 ++++++++++++++++++ docs/chart_template_guide/builtin_objects.md | 1 + docs/charts.md | 6 ++++-- docs/install.md | 2 +- 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index 054bd1c3b..6b02db1f4 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -50,7 +50,7 @@ The standalone Helm library encapsulates the Helm logic so that it can be levera The Helm client and library is written in the Go programming language. The library uses the Kubernetes client library to communicate with Kubernetes. Currently, -that library uses REST+JSON. Information in ConfigMaps located inside of Kubernetes. +that library uses REST+JSON. It stores information in Secrets located inside of Kubernetes. It does not need its own database. Configuration files are, when possible, written in YAML. diff --git a/docs/chart_best_practices/conventions.md b/docs/chart_best_practices/conventions.md index c295725b1..55624a558 100644 --- a/docs/chart_best_practices/conventions.md +++ b/docs/chart_best_practices/conventions.md @@ -37,3 +37,21 @@ There are a few small conventions followed for using the words Helm and helm. - The term 'chart' does not need to be capitalized, as it is not a proper noun. When in doubt, use _Helm_ (with an uppercase 'H'). + +## Restricting Helm by Version + +A `Chart.yaml` file can specify a `helmVersion` SemVer constraint: + +```yaml +name: mychart +version: 0.2.0 +helmVersion: ">=2.4.0" +``` + +This constraint should be set when templates use a new feature that was not +supported in older versions of Helm. While this parameter will accept sophisticated +SemVer rules, the best practice is to default to the form `>=2.4.0`, where `2.4.0` +is the version that introduced the new feature used in the chart. + +This feature was introduced in Helm 2.4.0, so any version of Helm older than +2.4.0 will simply ignore this field. diff --git a/docs/chart_template_guide/builtin_objects.md b/docs/chart_template_guide/builtin_objects.md index d0f32c87f..267b3cac4 100644 --- a/docs/chart_template_guide/builtin_objects.md +++ b/docs/chart_template_guide/builtin_objects.md @@ -20,6 +20,7 @@ In the previous section, we use `{{.Release.Name}}` to insert the name of a rele - `Capabilities.APIVersions` is a set of versions. - `Capabilities.APIVersions.Has $version` indicates whether a version (`batch/v1`) is enabled on the cluster. - `Capabilities.KubeVersion` provides a way to look up the Kubernetes version. It has the following values: `Major`, `Minor`, `GitVersion`, `GitCommit`, `GitTreeState`, `BuildDate`, `GoVersion`, `Compiler`, and `Platform`. + - `Capabilities.HelmVersion` provides a way to look up the Helm version. It has the following values: `SemVer`, `GitCommit`, and `GitTreeState`. - `Template`: Contains information about the current template that is being executed - `Name`: A namespaced filepath to the current template (e.g. `mychart/templates/mytemplate.yaml`) - `BasePath`: The namespaced path to the templates directory of the current chart (e.g. `mychart/templates`). diff --git a/docs/charts.md b/docs/charts.md index c94564472..b572b65a1 100644 --- a/docs/charts.md +++ b/docs/charts.md @@ -486,7 +486,8 @@ the Kubernetes objects from the charts and all its dependencies are 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 ***TBD*** +The install order of Kubernetes types is given by the enumeration InstallOrder in kind_sorter.go +(see [the Helm source file](https://github.com/helm/helm/blob/dev-v3/pkg/tiller/kind_sorter.go#L26)). ## Templates and Values @@ -586,7 +587,8 @@ sensitive_. `{{.Files.GetString name}}` functions. You can also access the contents of the file as `[]byte` using `{{.Files.GetBytes}}` - `Capabilities`: A map-like object that contains information about the versions - of Kubernetes (`{{.Capabilities.KubeVersion}}`, and the supported Kubernetes + of Kubernetes (`{{.Capabilities.KubeVersion}}`, Helm + (`{{.Capabilities.HelmVersion}}`, and the supported Kubernetes API versions (`{{.Capabilities.APIVersions.Has "batch/v1"`) **NOTE:** Any unknown Chart.yaml fields will be dropped. They will not diff --git a/docs/install.md b/docs/install.md index 7a92cf926..6e07c00b8 100755 --- a/docs/install.md +++ b/docs/install.md @@ -45,7 +45,7 @@ choco install kubernetes-helm ## From Script Helm now has an installer script that will automatically grab the latest version -of the Helm and [install it locally](https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get). +of Helm and [install it locally](https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get). You can fetch that script, and then execute it locally. It's well documented so that you can read through it and understand what it is doing before you run it.