From 231146eba788993e5e975cc2bd9ef50f970b9e67 Mon Sep 17 00:00:00 2001 From: Chi-En Wu Date: Thu, 23 Apr 2020 15:38:58 +0800 Subject: [PATCH] docs: add description about `common.labels` --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 50017f0..95a095e 100644 --- a/README.md +++ b/README.md @@ -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.