From 77ec4cedfb002dfa91136ca0e808568e237018a6 Mon Sep 17 00:00:00 2001 From: Haim Kortovich <106350817+HaimKortovich@users.noreply.github.com> Date: Wed, 7 May 2025 01:05:19 -0500 Subject: [PATCH] Add appAnnotations for all statefulsets (#604) --- .../templates/autorecovery-statefulset.yaml | 1 + .../templates/bookkeeper-statefulset.yaml | 1 + .../pulsar/templates/broker-statefulset.yaml | 1 + .../templates/oxia-coordinator-deployment.yaml | 1 + .../templates/oxia-server-statefulset.yaml | 1 + charts/pulsar/templates/proxy-statefulset.yaml | 1 + .../templates/pulsar-manager-statefulset.yaml | 1 + .../pulsar/templates/toolset-statefulset.yaml | 1 + .../templates/zookeeper-statefulset.yaml | 1 + charts/pulsar/values.yaml | 18 ++++++++++++++++++ 10 files changed, 27 insertions(+) diff --git a/charts/pulsar/templates/autorecovery-statefulset.yaml b/charts/pulsar/templates/autorecovery-statefulset.yaml index 9d21f47..fb58752 100644 --- a/charts/pulsar/templates/autorecovery-statefulset.yaml +++ b/charts/pulsar/templates/autorecovery-statefulset.yaml @@ -23,6 +23,7 @@ kind: StatefulSet metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}" namespace: {{ template "pulsar.namespace" . }} + annotations: {{ .Values.autorecovery.appAnnotations | toYaml | nindent 4 }} labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: {{ .Values.autorecovery.component }} diff --git a/charts/pulsar/templates/bookkeeper-statefulset.yaml b/charts/pulsar/templates/bookkeeper-statefulset.yaml index 21db44e..4f8e346 100644 --- a/charts/pulsar/templates/bookkeeper-statefulset.yaml +++ b/charts/pulsar/templates/bookkeeper-statefulset.yaml @@ -23,6 +23,7 @@ kind: StatefulSet metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}" namespace: {{ template "pulsar.namespace" . }} + annotations: {{ .Values.bookkeeper.appAnnotations | toYaml | nindent 4 }} labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: {{ .Values.bookkeeper.component }} diff --git a/charts/pulsar/templates/broker-statefulset.yaml b/charts/pulsar/templates/broker-statefulset.yaml index e44e1b0..26034f2 100644 --- a/charts/pulsar/templates/broker-statefulset.yaml +++ b/charts/pulsar/templates/broker-statefulset.yaml @@ -25,6 +25,7 @@ metadata: name: {{ $stsName | quote }} {{- $namespace := include "pulsar.namespace" . }} namespace: {{ $namespace | quote }} + annotations: {{ .Values.broker.appAnnotations | toYaml | nindent 4 }} labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: {{ .Values.broker.component }} diff --git a/charts/pulsar/templates/oxia-coordinator-deployment.yaml b/charts/pulsar/templates/oxia-coordinator-deployment.yaml index 62f74b4..c73c4bf 100644 --- a/charts/pulsar/templates/oxia-coordinator-deployment.yaml +++ b/charts/pulsar/templates/oxia-coordinator-deployment.yaml @@ -26,6 +26,7 @@ metadata: labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: {{ .Values.oxia.component }}-coordinator + annotations: {{ .Values.oxia.coordinator.appAnnotations | toYaml | nindent 4 }} spec: replicas: 1 selector: diff --git a/charts/pulsar/templates/oxia-server-statefulset.yaml b/charts/pulsar/templates/oxia-server-statefulset.yaml index 1df5e08..8f8e3a4 100644 --- a/charts/pulsar/templates/oxia-server-statefulset.yaml +++ b/charts/pulsar/templates/oxia-server-statefulset.yaml @@ -26,6 +26,7 @@ metadata: labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: {{ .Values.oxia.component }}-server + annotations: {{ .Values.oxia.server.appAnnotations | toYaml | nindent 4 }} spec: replicas: {{ .Values.oxia.server.replicas }} selector: diff --git a/charts/pulsar/templates/proxy-statefulset.yaml b/charts/pulsar/templates/proxy-statefulset.yaml index 6b858b3..8c1adc6 100644 --- a/charts/pulsar/templates/proxy-statefulset.yaml +++ b/charts/pulsar/templates/proxy-statefulset.yaml @@ -23,6 +23,7 @@ kind: StatefulSet metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}" namespace: {{ template "pulsar.namespace" . }} + annotations: {{ .Values.proxy.appAnnotations | toYaml | nindent 4 }} labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: {{ .Values.proxy.component }} diff --git a/charts/pulsar/templates/pulsar-manager-statefulset.yaml b/charts/pulsar/templates/pulsar-manager-statefulset.yaml index 70e8a03..770f36a 100755 --- a/charts/pulsar/templates/pulsar-manager-statefulset.yaml +++ b/charts/pulsar/templates/pulsar-manager-statefulset.yaml @@ -23,6 +23,7 @@ kind: StatefulSet metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}" namespace: {{ template "pulsar.namespace" . }} + annotations: {{ .Values.pulsar_manager.appAnnotations | toYaml | nindent 4 }} labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: {{ .Values.pulsar_manager.component }} diff --git a/charts/pulsar/templates/toolset-statefulset.yaml b/charts/pulsar/templates/toolset-statefulset.yaml index 06eee76..714e991 100644 --- a/charts/pulsar/templates/toolset-statefulset.yaml +++ b/charts/pulsar/templates/toolset-statefulset.yaml @@ -23,6 +23,7 @@ kind: StatefulSet metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}" namespace: {{ template "pulsar.namespace" . }} + annotations: {{ .Values.toolset.appAnnotations | toYaml | nindent 4 }} labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: {{ .Values.toolset.component }} diff --git a/charts/pulsar/templates/zookeeper-statefulset.yaml b/charts/pulsar/templates/zookeeper-statefulset.yaml index 55ad6bb..b92fde6 100755 --- a/charts/pulsar/templates/zookeeper-statefulset.yaml +++ b/charts/pulsar/templates/zookeeper-statefulset.yaml @@ -24,6 +24,7 @@ kind: StatefulSet metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}" namespace: {{ template "pulsar.namespace" . }} + annotations: {{ .Values.zookeeper.appAnnotations | toYaml | nindent 4 }} labels: {{- include "pulsar.standardLabels" . | nindent 4 }} component: {{ .Values.zookeeper.component }} diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml index 6b4cb88..ee9227d 100755 --- a/charts/pulsar/values.yaml +++ b/charts/pulsar/values.yaml @@ -385,6 +385,8 @@ zookeeper: type: requiredDuringSchedulingIgnoredDuringExecution # set topologySpreadConstraint to deploy pods across different zones topologySpreadConstraints: [] + # annotations for the app (statefulset/deployment) + appAnnotations: {} annotations: {} tolerations: [] gracePeriod: 30 @@ -499,6 +501,8 @@ oxia: replicationFactor: 3 ## templates/coordinator-deployment.yaml coordinator: + # annotations for the app (statefulset/deployment) + appAnnotations: {} # This is how Victoria Metrics or Prometheus discovers this component podMonitor: enabled: true @@ -521,6 +525,8 @@ oxia: # cloud.google.com/gke-nodepool: default-pool ## templates/server-statefulset.yaml server: + # annotations for the app (statefulset/deployment) + appAnnotations: {} # This is how Victoria Metrics or Prometheus discovers this component podMonitor: enabled: true @@ -638,6 +644,8 @@ bookkeeper: type: requiredDuringSchedulingIgnoredDuringExecution # set topologySpreadConstraint to deploy pods across different zones topologySpreadConstraints: [] + # annotations for the app (statefulset/deployment) + appAnnotations: {} annotations: {} tolerations: [] gracePeriod: 30 @@ -828,6 +836,8 @@ autorecovery: type: requiredDuringSchedulingIgnoredDuringExecution # set topologySpreadConstraint to deploy pods across different zones topologySpreadConstraints: [] + # annotations for the app (statefulset/deployment) + appAnnotations: {} annotations: {} # tolerations: [] gracePeriod: 30 @@ -1027,6 +1037,8 @@ broker: type: preferredDuringSchedulingIgnoredDuringExecution # set topologySpreadConstraint to deploy pods across different zones topologySpreadConstraints: [] + # annotations for the app (statefulset/deployment) + appAnnotations: {} annotations: {} tolerations: [] gracePeriod: 30 @@ -1279,6 +1291,8 @@ proxy: type: requiredDuringSchedulingIgnoredDuringExecution # set topologySpreadConstraint to deploy pods across different zones topologySpreadConstraints: [] + # annotations for the app (statefulset/deployment) + appAnnotations: {} annotations: {} tolerations: [] gracePeriod: 30 @@ -1447,6 +1461,8 @@ toolset: # cloud.google.com/gke-nodepool: default-pool # set topologySpreadConstraint to deploy pods across different zones topologySpreadConstraints: [] + # annotations for the app (statefulset/deployment) + appAnnotations: {} annotations: {} tolerations: [] gracePeriod: 30 @@ -1730,6 +1746,8 @@ pulsar_manager: # cloud.google.com/gke-nodepool: default-pool # set topologySpreadConstraint to deploy pods across different zones topologySpreadConstraints: [] + # annotations for the app (statefulset/deployment) + appAnnotations: {} annotations: {} tolerations: [] extraVolumes: []