Skip to content

Commit

Permalink
chart(rocketmq-cluster): release 12.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
itboon committed Aug 25, 2024
1 parent d1ce8b1 commit 2bb456e
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 12 deletions.
2 changes: 1 addition & 1 deletion charts/rocketmq-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: rocketmq-cluster
description: RocketMQ Helm chart
type: application

version: 12.2.0
version: 12.3.0
appVersion: '5.3.0'

maintainers:
Expand Down
9 changes: 9 additions & 0 deletions charts/rocketmq-cluster/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,13 @@
{{- end }}
Modify "{{ include "rocketmq.dashboard.configmap.fullname" . }}" configmap to change the password
{{- end }}
{{- end }}

{{- if .Values.controllerModeEnabled }}
{{- $brokerReplicaCount := .Values.broker.size.replica | int }}
{{- if eq $brokerReplicaCount 0 }}
{{ include "rocketmq.noticeValues.controllerMode" . | fail }}
{{- else }}
{{ include "rocketmq.noticeValues.controllerMode" . }}
{{- end }}
{{- end }}
23 changes: 22 additions & 1 deletion charts/rocketmq-cluster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ controller
controller
*/}}
{{- define "rocketmq.enableControllerInNamesrv" -}}
{{- if and .Values.controller.enabled .Values.controller.enableControllerInNamesrv -}}
{{- if and .Values.controllerModeEnabled (not .Values.controller.enabled) -}}
{{- print "true" -}}
{{- else -}}
{{- print "false" -}}
Expand Down Expand Up @@ -187,3 +187,24 @@ rocketmq.controller.dlegerPeers
{{- end -}}
{{- join ";" $address -}}
{{- end -}}

{{/*
rocketmq.noticeValues.controllerMode
*/}}
{{- define "rocketmq.noticeValues.controllerMode" -}}
{{ if .Values.controllerModeEnabled }}
Notice about controller mode:
Controller mode is an experimental feature, you can disable it (--set conrtollerModeEnabled=false)
If you decide to enable controller mode, you need to note:
{{- $brokerReplicaCount := .Values.broker.size.replica | int }}
{{- if lt $brokerReplicaCount 2 }}
The minimum number of replica is 1, and the recommended number of replica is 2
Please set a valid number of replica (--set broker.size.replica=2)
{{- end }}
{{- if eq (include "rocketmq.enableControllerInNamesrv" .) "true" }}
Controller roles require persistent storage (--set nameserver.persistence.enabled=true)
{{- else }}
Controller roles require persistent storage (--set controller.persistence.enabled=true)
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/rocketmq-cluster/templates/broker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:
- name: ROCKETMQ_JAVA_OPTIONS_OVERRIDE
value: {{ $javaOptsOverride }}
{{- end }}
{{- if and $.Values.broker.config.enableControllerMode }}
{{- if and $.Values.controllerModeEnabled }}
- name: enableControllerMode
value: "true"
{{- end }}
Expand Down
5 changes: 3 additions & 2 deletions charts/rocketmq-cluster/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ data:
{{- range $key, $value := .Values.broker.config }}
{{ $key }} = {{ $value }}
{{- end }}
{{- if and .Values.broker.config.enableControllerMode }}
{{- if and .Values.controllerModeEnabled }}
enableControllerMode = true
controllerAddr = {{ include "rocketmq.broker.controllerAddr" . }}
{{- end }}
brokerClusterName = {{ .Values.clusterName }}
controller-base.conf: |
{{- range $key, $value := .Values.controller.config }}
{{ $key }} = {{ $value }}
{{- end }}
{{- if .Values.controller.enableControllerInNamesrv }}
{{- if eq (include "rocketmq.enableControllerInNamesrv" $) "true" }}
enableControllerInNamesrv = true
{{- end }}
controllerDLegerPeers = {{ include "rocketmq.controller.dlegerPeers" $ }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- with .Values.controller -}}
{{- if and .enabled (not .enableControllerInNamesrv) -}}
{{- if and .enabled -}}
{{- $clusterRole := "controller" -}}
{{- $image := printf "%s:%s" $.Values.image.repository $.Values.image.tag }}
apiVersion: apps/v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.controller.enabled (not .Values.controller.enableControllerInNamesrv) -}}
{{- if and .Values.controller.enabled -}}
{{- with .Values.controller.service -}}
apiVersion: v1
kind: Service
Expand Down
4 changes: 2 additions & 2 deletions charts/rocketmq-cluster/templates/nameserver/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
- name: ROCKETMQ_JAVA_OPTIONS_OVERRIDE
value: {{ .jvm.javaOptsOverride | quote }}
{{- end }}
{{- if $.Values.controller.enableControllerInNamesrv }}
{{- if eq (include "rocketmq.enableControllerInNamesrv" $) "true" }}
- name: enableControllerInNamesrv
value: "true"
{{- end }}
Expand Down Expand Up @@ -108,7 +108,7 @@ spec:
- mountPath: /home/rocketmq/logs
name: nameserver-storage
subPath: logs
{{- if $.Values.controller.enableControllerInNamesrv }}
{{- if eq (include "rocketmq.enableControllerInNamesrv" $) "true" }}
- mountPath: /home/rocketmq/controller-data
name: nameserver-storage
subPath: controller-data
Expand Down
4 changes: 1 addition & 3 deletions charts/rocketmq-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ broker:
flushDiskType: "ASYNC_FLUSH"
waitTimeMillsInSendQueue: "1000"
# aclEnable: true
# enableControllerMode: false

affinityOverride: {}
tolerations: []
Expand Down Expand Up @@ -198,11 +197,10 @@ dashboard:
# hosts:
# - rocketmq-dashboard.example.com


## controller mode is an experimental feature
controllerModeEnabled: false
controller:
enabled: false
enableControllerInNamesrv: false
replicaCount: 3
jvm:
maxHeapSize: 600M
Expand Down

0 comments on commit 2bb456e

Please sign in to comment.