[fix] Fix broker service annotations issue and other annotations issues (#574)

* Fix broker services annotations issues

* Add annotations support to autorecovery.service

* Consistently use similar way to handle annotations

* Add autorecovery service annotations key to values.yaml
This commit is contained in:
Lari Hotari 2025-02-28 19:17:54 +02:00 committed by GitHub
parent f928380124
commit 4386eacba8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 21 additions and 6 deletions

View File

@ -26,6 +26,10 @@ metadata:
labels: labels:
{{- include "pulsar.standardLabels" . | nindent 4 }} {{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.autorecovery.component }} component: {{ .Values.autorecovery.component }}
{{- with .Values.autorecovery.service.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec: spec:
ports: ports:
- name: http - name: http

View File

@ -26,9 +26,9 @@ metadata:
labels: labels:
{{- include "pulsar.standardLabels" . | nindent 4 }} {{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.bookkeeper.component }} component: {{ .Values.bookkeeper.component }}
{{- if .Values.bookkeeper.service.annotations }} {{- with .Values.bookkeeper.service.annotations }}
annotations: annotations:
{{ toYaml .Values.bookkeeper.service.annotations | indent 4 }} {{ toYaml . | indent 4 }}
{{- end }} {{- end }}
spec: spec:
ports: ports:

View File

@ -26,7 +26,7 @@ metadata:
labels: labels:
{{- include "pulsar.standardLabels" . | nindent 4 }} {{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.broker.component }} component: {{ .Values.broker.component }}
{{- with .Values.broker.service_account.annotations }} {{- with .Values.broker.service.annotations }}
annotations: annotations:
{{ toYaml . | indent 4 }} {{ toYaml . | indent 4 }}
{{- end }} {{- end }}

View File

@ -26,8 +26,10 @@ metadata:
labels: labels:
{{- include "pulsar.standardLabels" . | nindent 4 }} {{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.pulsar_manager.component }} component: {{ .Values.pulsar_manager.component }}
{{- with .Values.pulsar_manager.service.annotations }}
annotations: annotations:
{{ toYaml .Values.pulsar_manager.service.annotations | indent 4 }} {{ toYaml . | indent 4 }}
{{- end }}
spec: spec:
type: {{ .Values.pulsar_manager.service.type }} type: {{ .Values.pulsar_manager.service.type }}
{{- if .Values.pulsar_manager.service.externalTrafficPolicy }} {{- if .Values.pulsar_manager.service.externalTrafficPolicy }}
@ -58,8 +60,10 @@ metadata:
labels: labels:
{{- include "pulsar.standardLabels" . | nindent 4 }} {{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.pulsar_manager.component }} component: {{ .Values.pulsar_manager.component }}
{{- with .Values.pulsar_manager.adminService.annotations }}
annotations: annotations:
{{ toYaml .Values.pulsar_manager.adminService.annotations | indent 4 }} {{ toYaml . | indent 4 }}
{{- end }}
spec: spec:
type: {{ .Values.pulsar_manager.adminService.type }} type: {{ .Values.pulsar_manager.adminService.type }}
ports: ports:

View File

@ -28,7 +28,10 @@ metadata:
{{- include "pulsar.standardLabels" . | nindent 4 }} {{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.zookeeper.component }} component: {{ .Values.zookeeper.component }}
annotations: annotations:
{{ toYaml .Values.zookeeper.service.annotations | indent 4 }} {{- with .Values.zookeeper.service.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec: spec:
ports: ports:
# prometheus needs to access /metrics endpoint # prometheus needs to access /metrics endpoint

View File

@ -833,6 +833,10 @@ autorecovery:
requests: requests:
memory: 64Mi memory: 64Mi
cpu: 0.05 cpu: 0.05
## Bookkeeper auto-recovery service
## templates/autorecovery-service.yaml
service:
annotations: {}
## Bookkeeper auto-recovery service account ## Bookkeeper auto-recovery service account
## templates/autorecovery-service-account.yaml ## templates/autorecovery-service-account.yaml
service_account: service_account: