feat(helm-chart): added support for shared ingress annotations

feat(helm-chart): revised README to include image.tag setting
This commit is contained in:
Fernando Almeida 2022-01-25 13:57:23 +00:00
parent 6bb2fa666d
commit a24e765351
6 changed files with 27 additions and 4 deletions

View File

@ -35,7 +35,8 @@ The following table lists the configurable K8s parameters of the EMQx chart and
Parameter | Description | Default Value Parameter | Description | Default Value
--- | --- | --- --- | --- | ---
`replicaCount` | It is recommended to have odd number of nodes in a cluster, otherwise the emqx cluster cannot be automatically healed in case of net-split. | `3` `replicaCount` | It is recommended to have odd number of nodes in a cluster, otherwise the emqx cluster cannot be automatically healed in case of net-split. | `3`
`image.repository` | EMQ X Image name | `emqx/emqx` `image.tag` | EMQ X Image tag (defaults to `.Chart.AppVersion`) | `nil`
`image.repository` | EMQ X Image repository | `emqx/emqx`
`image.pullPolicy` | The image pull policy | `IfNotPresent` `image.pullPolicy` | The image pull policy | `IfNotPresent`
`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`

View File

@ -119,7 +119,11 @@ spec:
{{- end }} {{- end }}
containers: containers:
- name: emqx - name: emqx
{{- if .Values.image.tag }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- else -}}}}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.containerSecurityContext.enabled }} {{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }} securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}

View File

@ -14,10 +14,15 @@ metadata:
helm.sh/chart: {{ include "emqx.chart" . }} helm.sh/chart: {{ include "emqx.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.ingress.dashboard.annotations }} {{- if or .Values.ingress.annotations .Values.ingress.dashboard.annotations }}
annotations: annotations:
{{- if .Values.ingress.annotations }}
{{- toYaml .Values.ingress.annotations | nindent 4 }}
{{- end }}
{{- if .Values.ingress.dashboard.annotations }}
{{- toYaml .Values.ingress.dashboard.annotations | nindent 4 }} {{- toYaml .Values.ingress.dashboard.annotations | nindent 4 }}
{{- end }} {{- end }}
{{- end }}
spec: spec:
{{- if and .Values.ingress.dashboard.ingressClassName (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} {{- if and .Values.ingress.dashboard.ingressClassName (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.dashboard.ingressClassName }} ingressClassName: {{ .Values.ingress.dashboard.ingressClassName }}

View File

@ -14,10 +14,15 @@ metadata:
helm.sh/chart: {{ include "emqx.chart" . }} helm.sh/chart: {{ include "emqx.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.ingress.mgmt.annotations }} {{- if or .Values.ingress.annotations .Values.ingress.mgmt.annotations }}
annotations: annotations:
{{- if .Values.ingress.annotations }}
{{- toYaml .Values.ingress.annotations | nindent 4 }}
{{- end }}
{{- if .Values.ingress.mgmt.annotations }}
{{- toYaml .Values.ingress.mgmt.annotations | nindent 4 }} {{- toYaml .Values.ingress.mgmt.annotations | nindent 4 }}
{{- end }} {{- end }}
{{- end }}
spec: spec:
{{- if and .Values.ingress.mgmt.ingressClassName (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} {{- if and .Values.ingress.mgmt.ingressClassName (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.mgmt.ingressClassName }} ingressClassName: {{ .Values.ingress.mgmt.ingressClassName }}

View File

@ -14,10 +14,15 @@ metadata:
helm.sh/chart: {{ include "emqx.chart" . }} helm.sh/chart: {{ include "emqx.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.ingress.wss.annotations }} {{- if or .Values.ingress.annotations .Values.ingress.wss.annotations }}
annotations: annotations:
{{- if .Values.ingress.annotations }}
{{- toYaml .Values.ingress.annotations | nindent 4 }}
{{- end }}
{{- if .Values.ingress.wss.annotations }}
{{- toYaml .Values.ingress.wss.annotations | nindent 4 }} {{- toYaml .Values.ingress.wss.annotations | nindent 4 }}
{{- end }} {{- end }}
{{- end }}
spec: spec:
{{- if and .Values.ingress.wss.ingressClassName (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} {{- if and .Values.ingress.wss.ingressClassName (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.wss.ingressClassName }} ingressClassName: {{ .Values.ingress.wss.ingressClassName }}

View File

@ -165,6 +165,9 @@ tolerations: []
affinity: {} affinity: {}
ingress: ingress:
## Ingress shared annotations
annotations: {}
## ingress for EMQX Dashboard ## ingress for EMQX Dashboard
dashboard: dashboard:
enabled: false enabled: false