From 76bf4b1a065162f4ffaf0c818765b8c7ffad0b2c Mon Sep 17 00:00:00 2001 From: Keith Shook <3358621+kashook@users.noreply.github.com> Date: Thu, 2 Apr 2020 10:28:24 -0400 Subject: [PATCH] [stable/cerebro] Add support for adding labels and annotations to pod (#21707) Signed-off-by: Keith Shook --- stable/cerebro/Chart.yaml | 2 +- stable/cerebro/README.md | 2 ++ stable/cerebro/templates/deployment.yaml | 6 ++++++ stable/cerebro/values.yaml | 4 +++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/stable/cerebro/Chart.yaml b/stable/cerebro/Chart.yaml index 3934c25b2d..6cc5ced402 100644 --- a/stable/cerebro/Chart.yaml +++ b/stable/cerebro/Chart.yaml @@ -1,5 +1,5 @@ name: cerebro -version: 1.6.0 +version: 1.7.0 appVersion: 0.8.5 apiVersion: v1 description: A Helm chart for Cerebro - a web admin tool that replaces Kopf. diff --git a/stable/cerebro/README.md b/stable/cerebro/README.md index 48a162045d..537a2e3fa7 100644 --- a/stable/cerebro/README.md +++ b/stable/cerebro/README.md @@ -49,7 +49,9 @@ The following table lists the configurable parameters of the cerebro chart and t | `init.image.tag` | The image tag to pull | `musl` | | `init.image.pullPolicy` | Image pull policy | `IfNotPresent` | | `deployment.annotations` | Annotations for deployment | `{}` | +| `deployment.podAnnotations` | Additional pod annotations | `{}` | | `deployment.labels` | Additional labels for deployment | `{}` | +| `deployment.podLabels` | Additional pod labels | `{}` | | `deployment.livenessProbe.enabled` | Enable livenessProbe | `true` | | `deployment.readinessProbe.enabled` | Enable readinessProbe | `true` | | `service.type` | Type of Service | `ClusterIP` | diff --git a/stable/cerebro/templates/deployment.yaml b/stable/cerebro/templates/deployment.yaml index b7961e2544..089faf64c5 100644 --- a/stable/cerebro/templates/deployment.yaml +++ b/stable/cerebro/templates/deployment.yaml @@ -26,8 +26,14 @@ spec: labels: app: {{ template "cerebro.name" . }} release: {{ .Release.Name }} + {{- if .Values.deployment.podLabels }} + {{- toYaml .Values.deployment.podLabels | nindent 8 }} + {{- end }} annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- if .Values.deployment.podAnnotations }} + {{- toYaml .Values.deployment.podAnnotations | nindent 8 }} + {{- end }} spec: {{- if .Values.securityContext }} securityContext: diff --git a/stable/cerebro/values.yaml b/stable/cerebro/values.yaml index ae8bf2800e..1c08f50f50 100644 --- a/stable/cerebro/values.yaml +++ b/stable/cerebro/values.yaml @@ -12,9 +12,11 @@ image: pullPolicy: IfNotPresent deployment: - # additionals labels + # additional labels labels: {} annotations: {} + podLabels: {} + podAnnotations: {} livenessProbe: enabled: true readinessProbe: