diff --git a/deploy/charts/emqx/README.md b/deploy/charts/emqx/README.md index 2c12c2296..496d52061 100644 --- a/deploy/charts/emqx/README.md +++ b/deploy/charts/emqx/README.md @@ -39,6 +39,8 @@ The following table lists the configurable parameters of the emqx chart and thei | `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 | +`podAnnotations ` | Annotations for pod | `{}` +`podManagementPolicy`| To redeploy a chart with existing PVC(s), the value must be set to Parallel to avoid deadlock | `Parallel` | `persistence.enabled` | Enable EMQX persistence using PVC |false| | `persistence.storageClass` | Storage class of backing PVC |`nil` (uses alpha storage class annotation)| | `persistence.existingClaim` | EMQX data Persistent Volume existing claim name, evaluated as a template |""| diff --git a/deploy/charts/emqx/templates/StatefulSet.yaml b/deploy/charts/emqx/templates/StatefulSet.yaml index 02c2ec02c..66104e270 100644 --- a/deploy/charts/emqx/templates/StatefulSet.yaml +++ b/deploy/charts/emqx/templates/StatefulSet.yaml @@ -44,8 +44,11 @@ spec: version: {{ .Chart.AppVersion }} app.kubernetes.io/name: {{ include "emqx.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} - {{- if .Values.recreatePods }} annotations: + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.recreatePods }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum | quote }} {{- end }} spec: diff --git a/deploy/charts/emqx/values.yaml b/deploy/charts/emqx/values.yaml index 72c98c3fd..b3a0755de 100644 --- a/deploy/charts/emqx/values.yaml +++ b/deploy/charts/emqx/values.yaml @@ -24,6 +24,8 @@ image: ## 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 +podAnnotations: {} + # Pod deployment policy # value: OrderedReady | Parallel # To redeploy a chart with existing PVC(s), the value must be set to Parallel to avoid deadlock