refactor: remove duplicate template common.chart

This commit is contained in:
Chi-En Wu
2020-04-23 16:19:20 +08:00
parent 1bd3a4c188
commit b5cae82278

View File

@ -21,6 +21,7 @@ It provides utilities that reflect best practices of Kubernetes chart developmen
* [`common.serviceMonitor`](#commonservicemonitor) * [`common.serviceMonitor`](#commonservicemonitor)
* [`common.serviceMonitor.secret`](#commonservicemonitorsecret) * [`common.serviceMonitor.secret`](#commonservicemonitorsecret)
- [Partial Objects](#partial-objects) - [Partial Objects](#partial-objects)
* [`common.chart`](#commonchart)
* [`common.container`](#commoncontainer) * [`common.container`](#commoncontainer)
* [`common.fullname`](#commonfullname) * [`common.fullname`](#commonfullname)
* [`common.labels`](#commonlabels) * [`common.labels`](#commonlabels)
@ -731,6 +732,26 @@ When writing Kubernetes resources, you may find the following helpers useful to
### `common.chart`
The `common.chart` helper prints the chart name and version, escaped to be legal in a Kubernetes label field.
Example template:
```yaml
helm.sh/chart: {{ include "common.chart" . }}
```
For the chart `foo` with version `1.2.3-beta.55+1234`, this will render:
```yaml
helm.sh/chart: foo-1.2.3-beta.55_1234
```
(Note that `+` is an illegal character in label values)
### `common.container` ### `common.container`
The `common.container` template accepts a list of three values: The `common.container` template accepts a list of three values: