docs: add description about common.labels

This commit is contained in:
Chi-En Wu
2020-04-23 15:38:58 +08:00
parent 8463dcfa6f
commit 231146eba7

View File

@ -22,6 +22,7 @@ It provides utilities that reflect best practices of Kubernetes chart developmen
* [`common.serviceMonitor.secret`](#commonservicemonitorsecret)
- [Partial Objects](#partial-objects)
* [`common.container`](#commoncontainer)
* [`common.labels`](#commonlabels)
* [`common.metadata`](#commonmetadata)
* [`common.pod.template`](#commonpodtemplate)
* [`common.selectorLabels`](#commonselectorlabels)
@ -864,6 +865,28 @@ spec:
### `common.labels`
`common.selectorLabels` prints the standard set of labels.
Example usage:
```
{{ include "common.labels" . }}
```
Example output:
```yaml
app.kubernetes.io/instance: release-name
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: mychart
app.kubernetes.io/version: 1.16.0
helm.sh/chart: mychart-0.1.0
```
### `common.metadata`
The `common.metadata` helper generates value for the `metadata:` section of a Kubernetes resource.