|
|
@@ -3,6 +3,10 @@
|
|
|
(include (print $.Template.BasePath "/configmap.acl.yaml") .)
|
|
|
(include (print $.Template.BasePath "/configmap.loadedPlugins.yaml") .)
|
|
|
(include (print $.Template.BasePath "/configmap.loadedModules.yaml") .) }}
|
|
|
+ ## Compatible with previous misspellings
|
|
|
+{{ $licenseSecretName := coalesce .Values.emqxLicenseSecretName .Values.emqxLicneseSecretName }}
|
|
|
+{{ $image := printf "%s:%s" .Values.image.repository (default .Values.image.tag .Chart.AppVersion) }}
|
|
|
+
|
|
|
apiVersion: apps/v1
|
|
|
kind: StatefulSet
|
|
|
metadata:
|
|
|
@@ -67,7 +71,7 @@ spec:
|
|
|
- key: loaded_plugins
|
|
|
path: loaded_plugins
|
|
|
{{- end }}
|
|
|
- {{- if .Values.emqxLoadedPlugins }}
|
|
|
+ {{- if .Values.emqxLoadedModules }}
|
|
|
- name: emqx-loaded-modules
|
|
|
configMap:
|
|
|
name: {{ include "emqx.fullname" . }}-loaded-modules
|
|
|
@@ -93,15 +97,13 @@ spec:
|
|
|
claimName: {{ tpl . $ }}
|
|
|
{{- end }}
|
|
|
{{- end }}
|
|
|
- {{- if .Values.emqxLicenseSecretName }}
|
|
|
- - name: emqx-license
|
|
|
- secret:
|
|
|
- secretName: {{ .Values.emqxLicenseSecretName }}
|
|
|
- ## Compatible with previous misspellings
|
|
|
- {{- else if .Values.emqxLicneseSecretName }}
|
|
|
+ {{- if .Values.extraVolumes }}
|
|
|
+{{ toYaml .Values.extraVolumes | indent 6 }}
|
|
|
+ {{- end }}
|
|
|
+ {{- if $licenseSecretName }}
|
|
|
- name: emqx-license
|
|
|
secret:
|
|
|
- secretName: {{ .Values.emqxLicneseSecretName }}
|
|
|
+ secretName: {{ $licenseSecretName }}
|
|
|
{{- end }}
|
|
|
serviceAccountName: {{ include "emqx.fullname" . }}
|
|
|
{{- if .Values.podSecurityContext.enabled }}
|
|
|
@@ -119,11 +121,7 @@ spec:
|
|
|
{{- end }}
|
|
|
containers:
|
|
|
- name: emqx
|
|
|
- {{- if .Values.image.tag }}
|
|
|
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
|
- {{- else -}}}}
|
|
|
- image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
|
|
|
- {{- end }}
|
|
|
+ image: {{ $image }}
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
{{- if .Values.containerSecurityContext.enabled }}
|
|
|
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
|
|
@@ -152,8 +150,11 @@ spec:
|
|
|
- name: ekka
|
|
|
containerPort: 4370
|
|
|
envFrom:
|
|
|
- - configMapRef:
|
|
|
- name: {{ include "emqx.fullname" . }}-env
|
|
|
+ - configMapRef:
|
|
|
+ name: {{ include "emqx.fullname" . }}-env
|
|
|
+ {{- if .Values.extraEnvFrom }}
|
|
|
+{{ toYaml .Values.extraEnvFrom | indent 10 }}
|
|
|
+ {{- end }}
|
|
|
env:
|
|
|
- name: EMQX_NAME
|
|
|
value: {{ .Release.Name }}
|
|
|
@@ -165,6 +166,9 @@ spec:
|
|
|
value: {{ include "emqx.fullname" . }}-headless
|
|
|
- name: EMQX_CLUSTER__K8S__NAMESPACE
|
|
|
value: {{ .Release.Namespace }}
|
|
|
+ {{- if .Values.extraEnv }}
|
|
|
+{{ toYaml .Values.extraEnv | indent 10 }}
|
|
|
+ {{- end }}
|
|
|
resources:
|
|
|
{{ toYaml .Values.resources | indent 12 }}
|
|
|
volumeMounts:
|
|
|
@@ -185,18 +189,18 @@ spec:
|
|
|
mountPath: "/opt/emqx/data/loaded_modules"
|
|
|
subPath: "loaded_modules"
|
|
|
{{- end }}
|
|
|
- {{- if .Values.emqxLicenseSecretName }}
|
|
|
- - name: emqx-license
|
|
|
- mountPath: "/opt/emqx/etc/emqx.lic"
|
|
|
- subPath: "emqx.lic"
|
|
|
- readOnly: true
|
|
|
- ## Compatible with previous misspellings
|
|
|
- {{ else if .Values.emqxLicneseSecretName }}
|
|
|
+ {{- if $licenseSecretName }}
|
|
|
- name: emqx-license
|
|
|
mountPath: "/opt/emqx/etc/emqx.lic"
|
|
|
subPath: "emqx.lic"
|
|
|
readOnly: true
|
|
|
{{ end }}
|
|
|
+ {{- if and .Values.extraVolumes .Values.extraVolumeMounts }}
|
|
|
+{{ toYaml .Values.extraVolumeMounts | indent 10 }}
|
|
|
+ {{- end }}
|
|
|
+ {{- if .Values.extraArgs }}
|
|
|
+ args: {{ toYaml .Values.extraArgs | nindent 10 }}
|
|
|
+ {{- end }}
|
|
|
readinessProbe:
|
|
|
httpGet:
|
|
|
path: /status
|