feat(helm-chart): add support for topologySpreadConstraints

This commit is contained in:
Thomas Schmid 2023-07-03 16:38:00 +02:00
parent 36a1350ef0
commit 27a9731935
5 changed files with 32 additions and 0 deletions

View File

@ -170,3 +170,15 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- range . }}
- maxSkew: {{ .maxSkew }}
topologyKey: {{ .topologyKey }}
whenUnsatisfiable: {{ .whenUnsatisfiable }}
labelSelector:
matchLabels:
app.kubernetes.io/name: {{ include "emqx.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
{{- end }}
{{- end }}

View File

@ -128,6 +128,9 @@ service:
## Service type
##
type: ClusterIP
## The cluster IP if one wants to customize it to a fixed value
##
clusterIP: None
## Port for MQTT
##
mqtt: 1883
@ -187,6 +190,8 @@ tolerations: []
affinity: {}
topologySpreadConstraints: []
ingress:
## ingress for EMQX Dashboard
dashboard:

View File

@ -62,6 +62,7 @@ The following table lists the configurable parameters of the emqx chart and thei
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Toleration labels for pod assignment | `[]` |
| `affinity` | Map of node/pod affinities | `{}` |
| `topologySpreadConstraints` | List of topology spread constraints without labelSelector | `[]` |
| `service.type` | Kubernetes Service type. | ClusterIP |
| `service.mqtt` | Port for MQTT. | 1883 |
| `service.mqttssl` | Port for MQTT(SSL). | 8883 |

View File

@ -170,3 +170,15 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- range . }}
- maxSkew: {{ .maxSkew }}
topologyKey: {{ .topologyKey }}
whenUnsatisfiable: {{ .whenUnsatisfiable }}
labelSelector:
matchLabels:
app.kubernetes.io/name: {{ include "emqx.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
{{- end }}
{{- end }}

View File

@ -190,6 +190,8 @@ tolerations: []
affinity: {}
topologySpreadConstraints: []
ingress:
## ingress for EMQX Dashboard
dashboard: