From a4a7e17788a136488ef6ae12366d5bd70bd464a6 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Mon, 10 Feb 2020 18:55:55 -0500 Subject: [PATCH] [sonarr] enable support for deployment annotations (#145) * enable deployment annotations Signed-off-by: Ryan Holt * include readme updates Signed-off-by: Ryan Holt --- charts/sonarr/Chart.yaml | 2 +- charts/sonarr/README.md | 1 + charts/sonarr/templates/deployment.yaml | 6 ++++++ charts/sonarr/values.yaml | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/sonarr/Chart.yaml b/charts/sonarr/Chart.yaml index 29f4217c..ca1919c0 100644 --- a/charts/sonarr/Chart.yaml +++ b/charts/sonarr/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: amd64-2.0.0.5321-ls62 description: Sonarr is a television show downloading client name: sonarr -version: 3.0.0 +version: 3.0.1 keywords: - sonarr - usenet diff --git a/charts/sonarr/README.md b/charts/sonarr/README.md index 97aaea76..db0254a7 100644 --- a/charts/sonarr/README.md +++ b/charts/sonarr/README.md @@ -79,6 +79,7 @@ The following tables lists the configurable parameters of the Sentry chart and t | `tolerations` | Toleration labels for pod assignment | `[]` | | `affinity` | Affinity settings for pod assignment | `{}` | | `podAnnotations` | Key-value pairs to add as pod annotations | `{}` | +| `deploymentAnnotations` | Key-value pairs to add as deployment annotations | `{}` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/charts/sonarr/templates/deployment.yaml b/charts/sonarr/templates/deployment.yaml index 04c3f17c..b7f5e55c 100644 --- a/charts/sonarr/templates/deployment.yaml +++ b/charts/sonarr/templates/deployment.yaml @@ -2,6 +2,12 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "sonarr.fullname" . }} + {{- if .Values.deploymentAnnotations }} + annotations: + {{- range $key, $value := .Values.deploymentAnnotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} labels: app.kubernetes.io/name: {{ include "sonarr.name" . }} helm.sh/chart: {{ include "sonarr.chart" . }} diff --git a/charts/sonarr/values.yaml b/charts/sonarr/values.yaml index 0c381a98..e7647650 100644 --- a/charts/sonarr/values.yaml +++ b/charts/sonarr/values.yaml @@ -140,3 +140,5 @@ tolerations: [] affinity: {} podAnnotations: {} + +deploymentAnnotations: {}