feat(rabbitmq): update storage class and enable clustering with custom settings

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-02-22 06:17:24 +08:00
parent 3216038dd8
commit ee02d8f511
2 changed files with 5653 additions and 7 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
global:
defaultStorageClass: "azure-blob-fuse-2-std-lrs"
storageClass: "azure-blob-fuse-2-std-lrs"
defaultStorageClass: "freeleaps-node-local"
storageClass: "freeleaps-node-local"
security:
allowInsecureImages: false
image:
@ -27,11 +27,11 @@ queue_master_locator: min-masters
clustering:
## @param clustering.enabled Enable RabbitMQ clustering
##
enabled: false
enabled: true
## @param clustering.name RabbitMQ cluster name
## If not set, a name is generated using the common.names.fullname template
##
name: ""
name: "freeleaps-alpha"
addressType: hostname
rebalance: false
forceBoot: false
@ -62,6 +62,20 @@ configuration: |-
{{- if and (not .Values.auth.securePassword) .Values.auth.password }}
default_pass = {{ .Values.auth.password }}
{{- end }}
{{- if .Values.clustering.enabled }}
## Clustering
##
cluster_name = {{ default (include "common.names.fullname" .) .Values.clustering.name }}
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s
cluster_formation.k8s.host = kubernetes.default
cluster_formation.k8s.address_type = {{ .Values.clustering.addressType }}
{{- $svcName := printf "%s-%s" (include "common.names.fullname" .) (default "headless" .Values.servicenameOverride) }}
cluster_formation.k8s.service_name = {{ $svcName }}
cluster_formation.k8s.hostname_suffix = .{{ $svcName }}.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }}
cluster_formation.node_cleanup.interval = 10
cluster_formation.node_cleanup.only_log_warning = true
cluster_partition_handling = {{ .Values.clustering.partitionHandling }}
{{- end }}
{{ if and .Values.clustering.enabled .Values.loadDefinition.enabled }}
cluster_formation.target_cluster_size_hint = {{ .Values.replicaCount }}
{{ end }}
@ -171,12 +185,12 @@ podSecurityContext:
fsGroupChangePolicy: Always
sysctls: []
supplementalGroups: []
fsGroup: 1000
fsGroup: 1001
containerSecurityContext:
enabled: true
seLinuxOptions: {}
runAsUser: 1000
runAsGroup: 1000
runAsUser: 1001
runAsGroup: 1001
runAsNonRoot: true
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true