From a4ba3345e1f5ff89781055d4378ff8d20a3e1e1a Mon Sep 17 00:00:00 2001 From: Ali Ghanbarzadeh Date: Fri, 9 Aug 2024 05:08:17 +0200 Subject: [PATCH] Add pod annotations Signed-off-by: Ali Ghanbarzadeh --- charts/core-dump-handler/README.md | 1 + charts/core-dump-handler/templates/daemonset.yaml | 3 +++ charts/core-dump-handler/values.schema.json | 8 +++++++- charts/core-dump-handler/values.yaml | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/charts/core-dump-handler/README.md b/charts/core-dump-handler/README.md index 4f358aa..026be63 100644 --- a/charts/core-dump-handler/README.md +++ b/charts/core-dump-handler/README.md @@ -311,6 +311,7 @@ Composer * podSelectorLabel: Enable composer only if pod has label matching the specified selector. (Default "" matches all pods) Daemonset +* podAnnotations: Annotations to be added to core-dump-handler pods (Default nil) * hostDirectory: Maps to the HOST_DIR environment variable (Default "/var/mnt/core-dump-handler") * coreDirectory: Maps to the CORE_DIR environment variable (Default "/var/mnt/core-dump-handler/cores") * eventDirectory: Maps to the EVENT_DIR environment variable (Default "/var/mnt/core-dump-handler/events") diff --git a/charts/core-dump-handler/templates/daemonset.yaml b/charts/core-dump-handler/templates/daemonset.yaml index 98514f4..f61f473 100644 --- a/charts/core-dump-handler/templates/daemonset.yaml +++ b/charts/core-dump-handler/templates/daemonset.yaml @@ -16,6 +16,9 @@ spec: name: {{ .Values.daemonset.label }} annotations: kubectl.kubernetes.io/default-container: "coredump-container" + {{- with .Values.daemonset.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- with .Values.image.pullSecrets }} imagePullSecrets: diff --git a/charts/core-dump-handler/values.schema.json b/charts/core-dump-handler/values.schema.json index ff586de..0cac93d 100644 --- a/charts/core-dump-handler/values.schema.json +++ b/charts/core-dump-handler/values.schema.json @@ -209,6 +209,12 @@ "label": { "type": "string" }, + "podAnnotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "hostDirectory": { "type": "string" }, @@ -346,4 +352,4 @@ "title": "ServiceAccount" } } -} +} \ No newline at end of file diff --git a/charts/core-dump-handler/values.yaml b/charts/core-dump-handler/values.yaml index c8c7e6e..a6938e6 100644 --- a/charts/core-dump-handler/values.yaml +++ b/charts/core-dump-handler/values.yaml @@ -34,6 +34,7 @@ composer: coreEvents: false daemonset: + podAnnotations: {} name: "core-dump-handler" label: "core-dump-ds" hostDirectory: "/var/mnt/core-dump-handler"