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
--- | --- | ---
`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.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`

View File

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

View File

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

View File

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

View File

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

View File

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