diff --git a/.ci/templates-all-values.yaml b/.ci/templates-all-values.yaml index 5638e859..06896f3f 100644 --- a/.ci/templates-all-values.yaml +++ b/.ci/templates-all-values.yaml @@ -237,9 +237,12 @@ auth: client: "admin" # ----------------------------------------------------------------------------- -# Job TTL -- exercises `if and .Values.job.ttl.enabled` in *-cluster-initialize +# Jobs -- exercises `if and .Values.job.ttl.enabled` in *-cluster-initialize +# and `with .Values.job.podAnnotations` in the Job pod templates # ----------------------------------------------------------------------------- job: + podAnnotations: + sidecar.istio.io/inject: "false" ttl: enabled: true secondsAfterFinished: 300 diff --git a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml index 34137ebb..1fbabb60 100755 --- a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml +++ b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml @@ -41,6 +41,10 @@ spec: labels: {{- include "pulsar.template.labels" . | nindent 8 }} component: {{ .Values.bookkeeper.component }}-init + {{- with .Values.job.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- include "pulsar.imagePullSecrets" . | nindent 6 }} serviceAccountName: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}" diff --git a/charts/pulsar/templates/broker-statefulset-upgrade.yaml b/charts/pulsar/templates/broker-statefulset-upgrade.yaml index 5552ccd4..fd49a8a4 100644 --- a/charts/pulsar/templates/broker-statefulset-upgrade.yaml +++ b/charts/pulsar/templates/broker-statefulset-upgrade.yaml @@ -87,6 +87,11 @@ metadata: spec: backoffLimit: 1 template: + {{- with .Values.job.podAnnotations }} + metadata: + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: serviceAccountName: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}-sts-cleanup" restartPolicy: Never diff --git a/charts/pulsar/templates/jwt-secret-init.yaml b/charts/pulsar/templates/jwt-secret-init.yaml index c4bd8b5b..7b1b1e47 100644 --- a/charts/pulsar/templates/jwt-secret-init.yaml +++ b/charts/pulsar/templates/jwt-secret-init.yaml @@ -94,6 +94,10 @@ spec: labels: {{- include "pulsar.template.labels" . | nindent 8 }} component: jwt-secret-init + {{- with .Values.job.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- include "pulsar.imagePullSecrets" . | nindent 6 }} serviceAccountName: "{{ template "pulsar.fullname" . }}-jwt-secret-init" diff --git a/charts/pulsar/templates/pulsar-cluster-initialize.yaml b/charts/pulsar/templates/pulsar-cluster-initialize.yaml index 873035cf..34557ce8 100755 --- a/charts/pulsar/templates/pulsar-cluster-initialize.yaml +++ b/charts/pulsar/templates/pulsar-cluster-initialize.yaml @@ -42,6 +42,10 @@ spec: labels: {{- include "pulsar.template.labels" . | nindent 8 }} component: {{ .Values.pulsar_metadata.component }} + {{- with .Values.job.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- include "pulsar.imagePullSecrets" . | nindent 6 }} {{- if .Values.pulsar_metadata.nodeSelector }} diff --git a/charts/pulsar/templates/zookeeper-statefulset-upgrade.yaml b/charts/pulsar/templates/zookeeper-statefulset-upgrade.yaml index fa6ed661..c87029ee 100644 --- a/charts/pulsar/templates/zookeeper-statefulset-upgrade.yaml +++ b/charts/pulsar/templates/zookeeper-statefulset-upgrade.yaml @@ -87,6 +87,11 @@ metadata: spec: backoffLimit: 1 template: + {{- with .Values.job.podAnnotations }} + metadata: + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: serviceAccountName: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}-sts-cleanup" restartPolicy: Never diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml index e269551c..3120a05c 100755 --- a/charts/pulsar/values.yaml +++ b/charts/pulsar/values.yaml @@ -2277,6 +2277,9 @@ dekaf: # pulsar-helm-chart/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml job: annotations: {} + # Annotations for the pods created by the chart's Jobs, for example + # sidecar.istio.io/inject: "false" so that an Istio sidecar doesn't keep a Job from completing + podAnnotations: {} ttl: enabled: false secondsAfterFinished: 3600