From ba96aa3efdffa058fcb87f3690aab0cf5c49a7af Mon Sep 17 00:00:00 2001 From: Jeff Billimek Date: Mon, 7 Oct 2019 13:18:18 -0400 Subject: [PATCH] adding pod annotations to nzbget (#73) * adding pod annotations to nzbget Signed-off-by: Jeff Billimek * adding missing if check Signed-off-by: Jeff Billimek --- nzbget/Chart.yaml | 2 +- nzbget/README.md | 1 + nzbget/templates/deployment.yaml | 6 ++++++ nzbget/values.yaml | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/nzbget/Chart.yaml b/nzbget/Chart.yaml index d15f82e9..47ab4a1b 100644 --- a/nzbget/Chart.yaml +++ b/nzbget/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: v21.0-ls14 description: NZBGet is a Usenet downloader client name: nzbget -version: 2.0.7 +version: 2.0.8 keywords: - nzbget - usenet diff --git a/nzbget/README.md b/nzbget/README.md index e0971b3b..b1a54e39 100644 --- a/nzbget/README.md +++ b/nzbget/README.md @@ -71,6 +71,7 @@ The following tables lists the configurable parameters of the Sentry chart and t | `nodeSelector` | Node labels for pod assignment | `{}` | | `tolerations` | Toleration labels for pod assignment | `[]` | | `affinity` | Affinity settings for pod assignment | `{}` | +| `podAnnotations` | Key-value pairs to add as pod annotations | `{}` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/nzbget/templates/deployment.yaml b/nzbget/templates/deployment.yaml index 0b9835b6..3483f059 100644 --- a/nzbget/templates/deployment.yaml +++ b/nzbget/templates/deployment.yaml @@ -7,6 +7,12 @@ metadata: helm.sh/chart: {{ include "nzbget.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} + {{- if .Values.podAnnotations }} + annotations: + {{- range $key, $value := .Values.podAnnotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} spec: replicas: 1 strategy: diff --git a/nzbget/values.yaml b/nzbget/values.yaml index 673ccf88..32d1a3a7 100644 --- a/nzbget/values.yaml +++ b/nzbget/values.yaml @@ -104,3 +104,5 @@ nodeSelector: {} tolerations: [] affinity: {} + +podAnnotations: {}