From 260cf89e3f4b565f18256da003a265b872ee8ae3 Mon Sep 17 00:00:00 2001 From: Amir-Wollman Date: Tue, 25 Jul 2023 11:44:26 +0300 Subject: [PATCH] Added configmap and deployment annotations capabilities --- charts/telegraf/templates/configmap.yaml | 4 ++++ charts/telegraf/templates/deployment.yaml | 4 ++++ charts/telegraf/values.yaml | 2 ++ 3 files changed, 10 insertions(+) diff --git a/charts/telegraf/templates/configmap.yaml b/charts/telegraf/templates/configmap.yaml index ceb4af75..a39b54c3 100644 --- a/charts/telegraf/templates/configmap.yaml +++ b/charts/telegraf/templates/configmap.yaml @@ -2,6 +2,10 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ include "telegraf.fullname" . }} + {{- if .Values.configmapAnnotations }} + annotations: + {{ toYaml .Values.configmapAnnotations | indent 4 }} + {{- end }} labels: {{- include "telegraf.labels" . | nindent 4 }} data: diff --git a/charts/telegraf/templates/deployment.yaml b/charts/telegraf/templates/deployment.yaml index af6661c1..031b22aa 100644 --- a/charts/telegraf/templates/deployment.yaml +++ b/charts/telegraf/templates/deployment.yaml @@ -2,6 +2,10 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "telegraf.fullname" . }} + {{- if .Values.deploymentAnnotations }} + annotations: + {{ toYaml .Values.configmapAnnotations | indent 4 }} + {{- end }} labels: {{- include "telegraf.labels" . | nindent 4 }} spec: diff --git a/charts/telegraf/values.yaml b/charts/telegraf/values.yaml index 1fc59375..37aa8552 100644 --- a/charts/telegraf/values.yaml +++ b/charts/telegraf/values.yaml @@ -9,6 +9,8 @@ image: pullPolicy: IfNotPresent podAnnotations: {} podLabels: {} +deploymentAnnotations: {} +configmapAnnotations: {} imagePullSecrets: [] ## Configure args passed to Telegraf containers args: []