Merge pull request #8237 from Rory-Z/master

chore(helm): add pod annotation
This commit is contained in:
Rory Z 2022-06-16 17:56:00 +08:00 committed by GitHub
commit addbba3b52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -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)| | `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 | | `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 | | `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.enabled` | Enable EMQX persistence using PVC |false|
| `persistence.storageClass` | Storage class of backing PVC |`nil` (uses alpha storage class annotation)| | `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 |""| | `persistence.existingClaim` | EMQX data Persistent Volume existing claim name, evaluated as a template |""|

View File

@ -44,8 +44,11 @@ spec:
version: {{ .Chart.AppVersion }} version: {{ .Chart.AppVersion }}
app.kubernetes.io/name: {{ include "emqx.name" . }} app.kubernetes.io/name: {{ include "emqx.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.recreatePods }}
annotations: annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.recreatePods }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum | quote }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum | quote }}
{{- end }} {{- end }}
spec: spec:

View File

@ -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. ## 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 recreatePods: false
podAnnotations: {}
# Pod deployment policy # Pod deployment policy
# value: OrderedReady | Parallel # value: OrderedReady | Parallel
# To redeploy a chart with existing PVC(s), the value must be set to Parallel to avoid deadlock # To redeploy a chart with existing PVC(s), the value must be set to Parallel to avoid deadlock