Skip to content

Commit

Permalink
chore: update pulsar examples
Browse files Browse the repository at this point in the history
  • Loading branch information
shanshanying committed Dec 9, 2024
1 parent 02468d2 commit 9f7ad3e
Show file tree
Hide file tree
Showing 23 changed files with 896 additions and 701 deletions.
2 changes: 1 addition & 1 deletion addons-cluster/pulsar/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ serviceRefs:
{{- end}}
{{- end}}
{{- if .Values.serviceReference.zookeeper.serviceDescriptor }}
serviceDescriptor: {{.Values.serviceReference.zookeeper.serviceDescriptor}}
serviceDescriptor: {{.Values.serviceReference.zookeeper.serviceDescriptor}}
{{- end }}
{{- end }}
{{- end}}
Expand Down
10 changes: 5 additions & 5 deletions addons-cluster/pulsar/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ metadata:
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- if eq .Values.version "3.0.2" }}
## Todo: use cluster api to control the rendering logic of service in component definition
{{- include "pulsar-cluster.brokerAddrFeatureGate" . | nindent 4 }}
"kubeblocks.io/extra-env": '{"KB_PULSAR_BROKER_NODEPORT": "{{ $.Values.nodePortEnabled }}"}'
{{- end }}
{{- end }}
spec:
terminationPolicy: {{ $.Values.terminationPolicy }}
Expand Down Expand Up @@ -117,6 +112,11 @@ spec:
componentDef: pulsar-broker
serviceVersion: {{ .Values.version }}
{{- end }}
{{- if eq .Values.version "3.0.2" }}
env:
- name: KB_PULSAR_BROKER_NODEPORT
value: "{{ $.Values.nodePortEnabled }}"
{{- end }}
{{ include "pulsar-zookeeper-ref" . | nindent 6 }}
{{- if .Values.nodePortEnabled }}
services:
Expand Down
9 changes: 9 additions & 0 deletions addons/pulsar/templates/cmpd-zookeeper-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ spec:
serviceKind: pulsar
serviceVersion: {{ .Values.defaultServiceVersion.zookeeper.major2 }}
updateStrategy: BestEffortParallel
services:
- name: zookeeper
serviceName: zookeeper
spec:
type: ClusterIP
ports:
- name: client
port: 2181
targetPort: 2181
configs:
- name: zookeeper-env
templateRef: {{ include "pulsar.zookeeperEnvTplName" . }}
Expand Down
9 changes: 9 additions & 0 deletions addons/pulsar/templates/cmpd-zookeeper-3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ spec:
serviceKind: pulsar
serviceVersion: {{ .Values.defaultServiceVersion.zookeeper.major3 }}
updateStrategy: BestEffortParallel
services:
- name: zookeeper
serviceName: zookeeper
spec:
type: ClusterIP
ports:
- name: client
port: 2181
targetPort: 2181
configs:
- name: zookeeper-env
templateRef: {{ include "pulsar.zookeeperEnvTplName" . }}
Expand Down
7 changes: 5 additions & 2 deletions examples/docs/install-addon.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ helm repo add kubeblocks-addons https://jihulab.com/api/v4/projects/150246/packa
# Update helm repo
helm repo update
# Search versions of the Addon
helm search repo kubeblocks/{addonName} --versions
helm search repo kubeblocks-addons/{addonName} --versions
# Install the version you want (replace $version with the one you need)
helm upgrade -i mysql kubeblocks-addons/{addonName} --version $version -n kb-system
helm upgrade -i {release-name} kubeblocks-addons/{addonName} --version $version -n kb-system
## e.g.
## helm upgrade -i kb-addon-pulsar kubeblocks-addons/pulsar --version 0.9.1 -n kb-system
## helm upgrade -i kb-addon-zookeeper kubeblocks-addons/zookeeper --version 0.9.1 -n kb-system
```

## Using kbcli
Expand Down
Loading

0 comments on commit 9f7ad3e

Please sign in to comment.