diff --git a/deploy/charts/emqx/README.md b/deploy/charts/emqx/README.md index d49ee692d..0e66ca2c9 100644 --- a/deploy/charts/emqx/README.md +++ b/deploy/charts/emqx/README.md @@ -37,6 +37,7 @@ The following table lists the configurable parameters of the emqx chart and thei | `image.repository` | EMQ X Image name |emqx/emqx| | `image.pullPolicy` | The image pull policy |IfNotPresent| | `image.pullSecrets ` | The image pull secrets |`[]` (does not add image pull secrets to deployed pods)| +| `envFromSecret` | The name pull a secret in the same kubernetes namespace which contains values that will be added to the environment | nil | | `recreatePods` | Forces the recreation of pods during upgrades, which can be useful to always apply the most recent configuration. | false | | `persistence.enabled` | Enable EMQX persistence using PVC |false| | `persistence.storageClass` | Storage class of backing PVC |`nil` (uses alpha storage class annotation)| diff --git a/deploy/charts/emqx/templates/StatefulSet.yaml b/deploy/charts/emqx/templates/StatefulSet.yaml index 24e805f76..dc2a76b68 100644 --- a/deploy/charts/emqx/templates/StatefulSet.yaml +++ b/deploy/charts/emqx/templates/StatefulSet.yaml @@ -114,6 +114,10 @@ spec: envFrom: - configMapRef: name: {{ include "emqx.fullname" . }}-env + {{- if .Values.envFromSecret }} + - secretRef: + name: {{ .Values.envFromSecret }} + {{- end }} env: - name: EMQX_NAME value: {{ .Release.Name }} diff --git a/deploy/charts/emqx/values.yaml b/deploy/charts/emqx/values.yaml index 72c8265c6..327c0960b 100644 --- a/deploy/charts/emqx/values.yaml +++ b/deploy/charts/emqx/values.yaml @@ -14,6 +14,13 @@ image: # pullSecrets: # - myRegistryKeySecretName + +# The name of a secret in the same kubernetes namespace which contains values to +# be added to the environment (must be manually created) +# This can be useful for passwords and logins, etc. + +# envFromSecret: "emqx-secrets" + ## Forces the recreation of pods during helm upgrades. This can be useful to update configuration values even if the container image did not change. recreatePods: false