From 574efd8df034cf3694c36c3900be46695fe4e953 Mon Sep 17 00:00:00 2001 From: weian Date: Sat, 8 Oct 2022 02:46:17 +0800 Subject: [PATCH] feat: add podLabels value --- Chart.yaml | 2 +- README.md | 1 + templates/_pod.tpl | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index a4638b2..76b50df 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -14,4 +14,4 @@ type: library # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 1.2.0 +version: 1.3.0 diff --git a/README.md b/README.md index 1cb43a2..9059191 100644 --- a/README.md +++ b/README.md @@ -1056,6 +1056,7 @@ It also uses the following configuration from the `$pod`: | `$pod.nodeSelector ` | Node labels for pod assignment | | `$pod.affinity ` | Expressions for affinity | | `$pod.tolerations ` | Toleration labels for pod assignment | +| `$pod.podLabels` | Pod extra labels | Underneath the hood, it invokes [`common.container`](#commoncontainer) template with `$pod` to populate the `PodSpec`'s container list. diff --git a/templates/_pod.tpl b/templates/_pod.tpl index 5fb3d15..95fb1ef 100644 --- a/templates/_pod.tpl +++ b/templates/_pod.tpl @@ -11,6 +11,9 @@ metadata: {{- end }} labels: {{- include "common.selectorLabels" $top | nindent 4 }} + {{- with $pod.podLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: {{- with $pod.imagePullSecrets }} imagePullSecrets: