From dd1149bd53b254c7cf8ae31c67cc4dcdc9d8a3b1 Mon Sep 17 00:00:00 2001 From: Yuval Levy Date: Wed, 18 Mar 2026 14:18:06 +0200 Subject: [PATCH] add support for custom annotations on initialization Jobs --- charts/pulsar/templates/bookkeeper-cluster-initialize.yaml | 4 ++++ charts/pulsar/templates/pulsar-cluster-initialize.yaml | 4 ++++ .../pulsar/templates/pulsar-manager-cluster-initialize.yaml | 4 ++++ charts/pulsar/values.yaml | 3 ++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml index 9b946bb2..735bf9de 100755 --- a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml +++ b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml @@ -26,6 +26,10 @@ metadata: labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: "{{ .Values.bookkeeper.component }}-init" + {{- with .Values.job.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: # This feature was previously behind a feature gate for several Kubernetes versions and will default to true in 1.23 and beyond # https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/ diff --git a/charts/pulsar/templates/pulsar-cluster-initialize.yaml b/charts/pulsar/templates/pulsar-cluster-initialize.yaml index 8da736f2..74599da8 100755 --- a/charts/pulsar/templates/pulsar-cluster-initialize.yaml +++ b/charts/pulsar/templates/pulsar-cluster-initialize.yaml @@ -27,6 +27,10 @@ metadata: labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: {{ .Values.pulsar_metadata.component }} + {{- with .Values.job.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: # This feature was previously behind a feature gate for several Kubernetes versions and will default to true in 1.23 and beyond # https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/ diff --git a/charts/pulsar/templates/pulsar-manager-cluster-initialize.yaml b/charts/pulsar/templates/pulsar-manager-cluster-initialize.yaml index c1ce6626..2b20d1f3 100755 --- a/charts/pulsar/templates/pulsar-manager-cluster-initialize.yaml +++ b/charts/pulsar/templates/pulsar-manager-cluster-initialize.yaml @@ -27,6 +27,10 @@ metadata: labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: {{ .Values.pulsar_manager.component }}-init + {{- with .Values.job.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: {{- if and .Values.job.ttl.enabled (semverCompare ">=1.23-0" .Capabilities.KubeVersion.Version) }} ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished | default 600 }} diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml index e242fe2f..8a7e3dd9 100755 --- a/charts/pulsar/values.yaml +++ b/charts/pulsar/values.yaml @@ -2006,11 +2006,12 @@ dekaf: accessModes: - ReadWriteOnce -# These are jobs where job ttl configuration is used +# These are jobs where job ttl configuration is used / annotations are applied # pulsar-helm-chart/charts/pulsar/templates/pulsar-cluster-initialize.yaml # pulsar-helm-chart/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml # pulsar-helm-chart/charts/pulsar/templates/pulsar-manager-cluster-initialize.yaml job: + annotations: {} ttl: enabled: false secondsAfterFinished: 3600