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]>
  • Loading branch information
ericsyh authored Jun 7, 2024
1 parent d1d15fe commit 6220ede
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 @@ -22,6 +22,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 @@ -23,6 +23,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 @@ -23,6 +23,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 @@ -2,17 +2,12 @@
# Copyright (c) 2019 - 2024 StreamNative, Inc.. All Rights Reserved.
#
{{- 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 @@ -23,6 +23,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 @@ -83,6 +83,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 @@ -22,6 +22,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 @@ -23,6 +23,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 @@ -23,6 +23,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 @@ -2,17 +2,12 @@
# Copyright (c) 2019 - 2024 StreamNative, Inc.. All Rights Reserved.
#
{{- 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 @@ -23,6 +23,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 @@ -91,6 +91,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 6220ede

Please sign in to comment.