Skip to content

Commit

Permalink
feat: add podLabel support for pulsar components (#1069)
Browse files Browse the repository at this point in the history
Signed-off-by: ericsyh <[email protected]>
  • Loading branch information
ericsyh authored and ignacioli committed Aug 9, 2023
1 parent c42c298 commit 8aa5aae
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/pulsar/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

apiVersion: v1
appVersion: "2.10"
kubeVersion: ">= 1.19.0-0 <= 1.25.0-0"
description: Apache Pulsar Helm chart for Kubernetes
name: pulsar
version: 2.10.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ metadata:
labels:
{{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.autorecovery.component }}
{{- with .Values.autorecovery.statefulset.labels }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- with .Values.autorecovery.statefulset.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}"
replicas: {{ .Values.autorecovery.replicaCount }}
Expand All @@ -42,6 +49,9 @@ spec:
labels:
{{- include "pulsar.template.labels" . | nindent 8 }}
component: {{ .Values.autorecovery.component }}
{{- with .Values.autorecovery.labels }}
{{ toYaml . | indent 8 }}
{{- end }}
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "{{ .Values.autorecovery.ports.http }}"
Expand Down
10 changes: 10 additions & 0 deletions charts/pulsar/templates/bookkeeper/bookkeeper-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ metadata:
labels:
{{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.bookkeeper.component }}
{{- with .Values.bookkeeper.statefulset.labels }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- with .Values.bookkeeper.statefulset.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}"
replicas: {{ .Values.bookkeeper.replicaCount }}
Expand All @@ -41,6 +48,9 @@ spec:
labels:
{{- include "pulsar.template.labels" . | nindent 8 }}
component: {{ .Values.bookkeeper.component }}
{{- with .Values.bookkeeper.labels }}
{{ toYaml . | indent 8 }}
{{- end }}
annotations:
{{- if .Values.monitoring.datadog }}
{{- include "pulsar.bookkeeper.datadog.annotation" . | nindent 8 }}
Expand Down
10 changes: 10 additions & 0 deletions charts/pulsar/templates/broker/broker-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ metadata:
labels:
{{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.broker.component }}
{{- with .Values.broker.statefulset.labels }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- with .Values.broker.statefulset.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}"
replicas: {{ .Values.broker.replicaCount }}
Expand All @@ -41,6 +48,9 @@ spec:
labels:
{{- include "pulsar.template.labels" . | nindent 8 }}
component: {{ .Values.broker.component }}
{{- with .Values.broker.labels }}
{{ toYaml . | indent 8 }}
{{- end }}
annotations:
{{- if .Values.monitoring.datadog }}
{{- include "pulsar.broker.datadog.annotation" . | nindent 8 }}
Expand Down
10 changes: 10 additions & 0 deletions charts/pulsar/templates/proxy/proxy-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ metadata:
labels:
{{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.proxy.component }}
{{- with .Values.proxy.statefulset.labels }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- with .Values.proxy.statefulset.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
replicas: {{ .Values.proxy.replicaCount }}
Expand All @@ -41,6 +48,9 @@ spec:
labels:
{{- include "pulsar.template.labels" . | nindent 8 }}
component: {{ .Values.proxy.component }}
{{- with .Values.proxy.labels }}
{{ toYaml . | indent 8 }}
{{- end }}
annotations:
{{- if .Values.monitoring.datadog }}
{{- include "pulsar.proxy.datadog.annotation" . | nindent 8 }}
Expand Down
10 changes: 10 additions & 0 deletions charts/pulsar/templates/zookeeper/zookeeper-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,16 @@ kind: StatefulSet
metadata:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}"
namespace: {{ template "pulsar.namespace" . }}
{{- with .Values.zookeeper.statefulset.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
labels:
{{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.zookeeper.component }}
{{- with .Values.zookeeper.statefulset.labels }}
{{ toYaml . | indent 4 }}
{{- end }}
spec:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}"
replicas: {{ .Values.zookeeper.replicaCount }}
Expand All @@ -42,6 +49,9 @@ spec:
labels:
{{- include "pulsar.template.labels" . | nindent 8 }}
component: {{ .Values.zookeeper.component }}
{{- with .Values.zookeeper.labels }}
{{ toYaml . | indent 8 }}
{{- end }}
annotations:
{{- if .Values.monitoring.datadog }}
{{- include "pulsar.zookeeper.datadog.annotation" . | nindent 8 }}
Expand Down
24 changes: 24 additions & 0 deletions charts/pulsar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ zookeeper:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8000"
labels: {}
securityContext:
fsGroup: 0
fsGroupChangePolicy: "OnRootMismatch"
Expand Down Expand Up @@ -611,6 +612,9 @@ zookeeper:
-XX:+DisableExplicitGC
-XX:+PerfDisableSharedMem
-Dzookeeper.forceSync=no
statefulset:
annotations: {}
labels: {}
## Zookeeper service
## templates/zookeeper-service.yaml
##
Expand Down Expand Up @@ -721,6 +725,7 @@ bookkeeper:
# preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee
type: preferredDuringSchedulingIgnoredDuringExecution
annotations: {}
labels: {}
securityContext:
fsGroup: 0
tolerations: []
Expand Down Expand Up @@ -819,6 +824,9 @@ bookkeeper:
-XX:+ExitOnOutOfMemoryError
-XX:+PerfDisableSharedMem
-verbosegc
statefulset:
annotations: {}
labels: {}
## Bookkeeper Service
## templates/bookkeeper-service.yaml
##
Expand Down Expand Up @@ -851,6 +859,7 @@ autorecovery:
# preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee
type: preferredDuringSchedulingIgnoredDuringExecution
annotations: {}
labels: {}
securityContext:
fsGroup: 0
# tolerations: []
Expand All @@ -868,6 +877,9 @@ autorecovery:
configData:
BOOKIE_MEM: >
-Xms64m -Xmx64m
statefulset:
annotations: {}
labels: {}

## Pulsar Zookeeper metadata. The metadata will be deployed as
## soon as the last zookeeper node is reachable. The deployment
Expand Down Expand Up @@ -963,6 +975,7 @@ broker:
# preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee
type: preferredDuringSchedulingIgnoredDuringExecution
annotations: {}
labels: {}
tolerations: []
securityContext: {}
gracePeriod: 30
Expand Down Expand Up @@ -1023,6 +1036,9 @@ broker:
managedLedgerDefaultEnsembleSize: "3"
managedLedgerDefaultWriteQuorum: "3"
managedLedgerDefaultAckQuorum: "2"
statefulset:
annotations: {}
labels: {}
## Broker service
## templates/broker-service.yaml
##
Expand Down Expand Up @@ -1130,6 +1146,7 @@ functions:
clusterRole: true
autoRollDeployment: true
annotations: {}
labels: {}
ports:
http: 8080
https: 8443
Expand All @@ -1153,6 +1170,9 @@ functions:
failureThreshold: 30
initialDelaySeconds: 60
periodSeconds: 10
statefulset:
annotations: {}
labels: {}
service:
annotations: {}
affinity:
Expand Down Expand Up @@ -1255,6 +1275,7 @@ proxy:
# preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee
type: preferredDuringSchedulingIgnoredDuringExecution
annotations: {}
labels: {}
securityContext: {}
tolerations: []
gracePeriod: 30
Expand Down Expand Up @@ -1340,6 +1361,9 @@ proxy:
pulsarssl: 6651
websocket: 9090
websockettls: 9443
statefulset:
annotations: {}
labels: {}
service:
annotations: {}
type: ClusterIP
Expand Down

0 comments on commit 8aa5aae

Please sign in to comment.