[stable/rabbitmq-ha] Add support for additional pod affinity settings. (#20391)

* [stable/rabbitmq-ha] Add support for additional pod affinity settings.

Signed-off-by: l.h. riley <liam.h.riley@gmail.com>

* [stable/rabbitmq-ha] affinity overrides default podAntiAffinity settings.

Signed-off-by: l.h. riley <liam.h.riley@gmail.com>
This commit is contained in:
l.h. riley
2020-02-17 16:29:28 -08:00
committed by GitHub
parent 04796e40c1
commit ca058a2194
4 changed files with 18 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
name: rabbitmq-ha
apiVersion: v1
appVersion: 3.8.0
version: 1.38.2
version: 1.39.0
description: Highly available RabbitMQ cluster, the open source message broker
software that implements the Advanced Message Queuing Protocol (AMQP).
keywords:
+3 -2
View File
@@ -98,8 +98,9 @@ and their default values.
| `persistentVolume.name` | Persistent volume name | `data` |
| `persistentVolume.size` | Persistent volume size | `8Gi` |
| `persistentVolume.storageClass` | Persistent volume storage class | `-` |
| `podAntiAffinity` | Pod antiaffinity, `hard` or `soft` | `soft` |
| `podAntiAffinityTopologyKey` | TopologyKey for antiaffinity, default is hostname
| `podAntiAffinity` | Pod anti-affinity, `hard` or `soft` | `soft` |
| `podAntiAffinityTopologyKey` | TopologyKey for anti-affinity, default is hostname | `"kubernetes.io/hostname"` |
| `affinity` | Affinity settings. If specified, this will disable `podAntiAffinity` settings. If you still need anti-affinity, you must include the configuration here. | `{}` |
| `podDisruptionBudget` | Pod Disruption Budget rules | `{}` |
| `podManagementPolicy` | Whether the pods should be restarted in parallel or one at a time. Either `OrderedReady` or `Parallel`. | `OrderedReady` |
| `prometheus.exporter.enabled` | Configures Prometheus Exporter to expose and scrape stats | `false` |
@@ -264,6 +264,12 @@ spec:
{{- if .Values.schedulerName }}
schedulerName: "{{ .Values.schedulerName }}"
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- with .Values.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
{{- if eq .Values.podAntiAffinity "hard" }}
affinity:
podAntiAffinity:
@@ -285,6 +291,8 @@ spec:
app: {{ template "rabbitmq-ha.name" . }}
release: {{ .Release.Name }}
{{- end }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
+6
View File
@@ -417,6 +417,12 @@ statefulSetAnnotations: {}
podAntiAffinity: soft
podAntiAffinityTopologyKey: "kubernetes.io/hostname"
## Affinity settings
## Defining 'affinity' will disable any podAntiAffinity settings.
## If you still need anti-affinity, you must include the configuration here.
##
affinity: {}
## Create default configMap
##
existingConfigMap: false