Skip to content

Commit

Permalink
feat: add the pulsar_coordinator in the values (#1165)
Browse files Browse the repository at this point in the history
* feat: add the pulsar_coordinator in the values

Signed-off-by: ericsyh <[email protected]>

* update crd defination

Signed-off-by: ericsyh <[email protected]>

* update to the sn-platform chart

Signed-off-by: ericsyh <[email protected]>

* fix lint

Signed-off-by: ericsyh <[email protected]>

* add the coordinator label on sn-platform chart

Signed-off-by: ericsyh <[email protected]>

---------

Signed-off-by: ericsyh <[email protected]>
(cherry picked from commit 6220ede)
  • Loading branch information
ericsyh committed Jun 13, 2024
1 parent f458f03 commit 48c9709
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ metadata:
{{- with .Values.bookkeeper.bookKeeperCluster.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.components.pulsar_coordinator }}
k8s.streamnative.io/coordinator-name: "{{ template "pulsar.fullname" . }}-coordinator"
{{- end }}
spec:
{{- if not .Values.initialize }}
initialized: true
Expand Down
3 changes: 3 additions & 0 deletions charts/sn-platform-slim/templates/broker/broker-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ metadata:
{{- with .Values.broker.pulsarBroker.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.components.pulsar_coordinator }}
k8s.streamnative.io/coordinator-name: "{{ template "pulsar.fullname" . }}-coordinator"
{{- end }}
spec:
{{- if not .Values.initialize }}
initialized: true
Expand Down
3 changes: 3 additions & 0 deletions charts/sn-platform-slim/templates/proxy/proxy-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ metadata:
{{- with .Values.proxy.pulsarProxy.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.components.pulsar_coordinator }}
k8s.streamnative.io/coordinator-name: "{{ template "pulsar.fullname" . }}-coordinator"
{{- end }}
spec:
brokerAddress: {{ template "pulsar.proxy.broker.service.address" . }}
replicas: {{ .Values.proxy.replicaCount }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,12 @@
# under the License.
#
{{- if .Values.components.pulsar_coordinator }}
apiVersion: cloud.streamnative.io/v1alpha1
apiVersion: k8s.streamnative.io/v1alpha1
kind: PulsarCoordinator
metadata:
name: "{{ template "pulsar.fullname" . }}"
name: "{{ template "pulsar.fullname" . }}-coordinator"
namespace: {{ template "pulsar.namespace" . }}
annotations:
helm.sh/hook: pre-install,pre-upgrade
spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- if .Values.placement.availability_policy }}
placement:
availabilityPolicy: {{ .Values.placement.availability_policy }}
{{- end }}
toolSet:
enabled: false
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ metadata:
{{- with .Values.zookeeper.zooKeeperCluster.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.components.pulsar_coordinator }}
k8s.streamnative.io/coordinator-name: "{{ template "pulsar.fullname" . }}-coordinator"
{{- end }}
spec:
replicas: {{ .Values.zookeeper.replicaCount }}
image: "{{ .Values.images.zookeeper.repository }}:{{ .Values.images.zookeeper.tag }}"
Expand Down
3 changes: 3 additions & 0 deletions charts/sn-platform-slim/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ components:
streamnative_console: true
# pulsar detector
pulsar_detector: true
# pulsar_coordinator is a new CRD from the sn-operator, make sure you already installed the sn-operator or
# upgrade from the pulsar-operator with the documentation of https://docs.streamnative.io/private/upgrade-from-pulsar-operators
pulsar_coordinator: false

## Monitoring Components
##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ metadata:
{{- with .Values.bookkeeper.bookKeeperCluster.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.components.pulsar_coordinator }}
k8s.streamnative.io/coordinator-name: "{{ template "pulsar.fullname" . }}-coordinator"
{{- end }}
spec:
{{- if not .Values.initialize }}
initialized: true
Expand Down
3 changes: 3 additions & 0 deletions charts/sn-platform/templates/broker/broker-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ metadata:
{{- with .Values.broker.pulsarBroker.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.components.pulsar_coordinator }}
k8s.streamnative.io/coordinator-name: "{{ template "pulsar.fullname" . }}-coordinator"
{{- end }}
spec:
{{- if not .Values.initialize }}
initialized: true
Expand Down
3 changes: 3 additions & 0 deletions charts/sn-platform/templates/proxy/proxy-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ metadata:
{{- with .Values.proxy.pulsarProxy.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.components.pulsar_coordinator }}
k8s.streamnative.io/coordinator-name: "{{ template "pulsar.fullname" . }}-coordinator"
{{- end }}
spec:
brokerAddress: {{ template "pulsar.proxy.broker.service.address" . }}
replicas: {{ .Values.proxy.replicaCount }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,12 @@
# under the License.
#
{{- if .Values.components.pulsar_coordinator }}
apiVersion: cloud.streamnative.io/v1alpha1
apiVersion: k8s.streamnative.io/v1alpha1
kind: PulsarCoordinator
metadata:
name: "{{ template "pulsar.fullname" . }}"
name: "{{ template "pulsar.fullname" . }}-coordinator"
namespace: {{ template "pulsar.namespace" . }}
annotations:
helm.sh/hook: pre-install,pre-upgrade
spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- if .Values.placement.availability_policy }}
placement:
availabilityPolicy: {{ .Values.placement.availability_policy }}
{{- end }}
toolSet:
enabled: false
{{- end }}
3 changes: 3 additions & 0 deletions charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ metadata:
{{- with .Values.zookeeper.zooKeeperCluster.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.components.pulsar_coordinator }}
k8s.streamnative.io/coordinator-name: "{{ template "pulsar.fullname" . }}-coordinator"
{{- end }}
spec:
replicas: {{ .Values.zookeeper.replicaCount }}
image: "{{ .Values.images.zookeeper.repository }}:{{ .Values.images.zookeeper.tag }}"
Expand Down
3 changes: 3 additions & 0 deletions charts/sn-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ components:
superset: false
# custom_metric_server
custom_metric_server: false
# pulsar_coordinator is a new CRD from the sn-operator, make sure you already installed the sn-operator or
# upgrade from the pulsar-operator with the documentation of https://docs.streamnative.io/private/upgrade-from-pulsar-operators
pulsar_coordinator: false

## Monitoring Components
##
Expand Down

0 comments on commit 48c9709

Please sign in to comment.