-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chart(rocketmq-cluster): release 12.1.0
- Loading branch information
Showing
10 changed files
with
179 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
{{- if and .Values.dashboard.enabled .Values.dashboard.auth .Values.dashboard.auth.enabled -}} | ||
{{- $authValues := .Values.dashboard.auth -}} | ||
{{- $fullName := include "rocketmq.dashboard.configmap.fullname" . -}} | ||
{{- with .Values.dashboard }} | ||
{{- if and .enabled .auth .auth.enabled -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ $fullName| quote }} | ||
name: {{ include "rocketmq.dashboard.configmap.fullname" $ | quote }} | ||
data: | ||
{{- if .Values.dashboard.auth.users }} | ||
{{- if .auth.users }} | ||
users.properties: | | ||
{{- range .Values.dashboard.auth.users }} | ||
{{- range .auth.users }} | ||
{{ .name }}={{ .password }}{{ if .isAdmin }},1{{ end }} | ||
{{- end }} | ||
{{- else }} | ||
users.properties: | | ||
admin=admin,1 | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
55 changes: 32 additions & 23 deletions
55
charts/rocketmq-cluster/templates/dashboard/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,76 @@ | ||
{{- if .Values.dashboard.enabled -}} | ||
{{- $fullName := include "rocketmq.dashboard.fullname" . -}} | ||
{{- $nameserverFullName := include "rocketmq.nameserver.fullname" . -}} | ||
{{- $maxHeapSize := .Values.dashboard.jvm.maxHeapSize }} | ||
{{- $image := printf "%s:%s" .Values.dashboard.image.repository .Values.dashboard.image.tag }} | ||
{{- with .Values.dashboard -}} | ||
{{- if .enabled -}} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ $fullName | quote }} | ||
name: {{ include "rocketmq.dashboard.fullname" $ | quote }} | ||
labels: | ||
{{- include "rocketmq.labels" . | nindent 4 }} | ||
{{- include "rocketmq.labels" $ | nindent 4 }} | ||
{{- with .annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
replicas: {{ .Values.dashboard.replicaCount }} | ||
replicas: {{ .replicaCount }} | ||
selector: | ||
matchLabels: | ||
{{- include "rocketmq.selectorLabels" . | nindent 6 }} | ||
{{- include "rocketmq.selectorLabels" $ | nindent 6 }} | ||
component: dashboard | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/config: {{ include (print $.Template.BasePath "/dashboard/configmap.yaml") $ | sha256sum }} | ||
{{- with .podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
labels: | ||
{{- include "rocketmq.selectorLabels" . | nindent 8 }} | ||
{{- include "rocketmq.selectorLabels" $ | nindent 8 }} | ||
component: dashboard | ||
spec: | ||
containers: | ||
- name: dashboard | ||
image: {{ $image | quote }} | ||
imagePullPolicy: {{ .Values.dashboard.image.pullPolicy | default "IfNotPresent" }} | ||
image: {{ printf "%s:%s" .image.repository .image.tag | quote }} | ||
imagePullPolicy: {{ .image.pullPolicy | default "IfNotPresent" }} | ||
env: | ||
- name: JAVA_OPTS | ||
value: {{ printf "-XX:MaxHeapSize=%s -Drocketmq.namesrv.addr=%s:9876" .Values.dashboard.jvm.maxHeapSize $nameserverFullName }} | ||
{{- if .Values.dashboard.auth.enabled }} | ||
{{- $namesrvAddr := printf "%s.%s.svc:9876" (include "rocketmq.nameserver.fullname" $) $.Release.Namespace }} | ||
value: {{ printf "-XX:MaxHeapSize=%s -Drocketmq.namesrv.addr=%s" .jvm.maxHeapSize $namesrvAddr }} | ||
{{- if .auth.enabled }} | ||
- name: rocketmq.config.loginRequired | ||
value: "true" | ||
- name: rocketmq.config.dataPath | ||
value: {{ include "rocketmq.dashboard.dataPath" . }} | ||
value: {{ include "rocketmq.dashboard.dataPath" $ }} | ||
{{- end }} | ||
ports: | ||
- name: http | ||
containerPort: 8080 | ||
protocol: TCP | ||
resources: | ||
{{- toYaml .Values.dashboard.resources | nindent 10 }} | ||
{{- with .Values.dashboard.livenessProbe }} | ||
{{- toYaml .resources | nindent 10 }} | ||
{{- with .livenessProbe }} | ||
livenessProbe: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.dashboard.readinessProbe }} | ||
{{- with .readinessProbe }} | ||
readinessProbe: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.dashboard.auth.enabled }} | ||
{{- if .auth.enabled }} | ||
volumeMounts: | ||
- mountPath: "{{ include "rocketmq.dashboard.dataPath" . }}/users.properties" | ||
- mountPath: "{{ include "rocketmq.dashboard.dataPath" $ }}/users.properties" | ||
name: dashboard-cm | ||
subPath: users.properties | ||
{{- end }} | ||
terminationGracePeriodSeconds: {{ .Values.dashboard.terminationGracePeriodSeconds | default 5 }} | ||
{{- if .Values.dashboard.auth.enabled }} | ||
terminationGracePeriodSeconds: {{ .terminationGracePeriodSeconds | default 5 }} | ||
{{- if .auth.enabled }} | ||
volumes: | ||
- configMap: | ||
items: | ||
- key: users.properties | ||
path: users.properties | ||
name: {{ include "rocketmq.dashboard.configmap.fullname" . }} | ||
name: {{ include "rocketmq.dashboard.configmap.fullname" $ }} | ||
name: dashboard-cm | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.