From 4c2fd1f374f076ec675a66dba3a33cbc70776501 Mon Sep 17 00:00:00 2001 From: Tomas Pizarro Date: Thu, 13 Dec 2018 11:15:27 +0100 Subject: [PATCH] [stable/mongodb] Add affinities to Statefulsets (#9960) Signed-off-by: tompizmor --- stable/mongodb/Chart.yaml | 2 +- stable/mongodb/templates/statefulset-arbiter-rs.yaml | 4 ++++ stable/mongodb/templates/statefulset-primary-rs.yaml | 4 ++++ stable/mongodb/templates/statefulset-secondary-rs.yaml | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/stable/mongodb/Chart.yaml b/stable/mongodb/Chart.yaml index 660bf28fd2..32fd0ecc62 100644 --- a/stable/mongodb/Chart.yaml +++ b/stable/mongodb/Chart.yaml @@ -1,5 +1,5 @@ name: mongodb -version: 4.9.1 +version: 4.10.0 appVersion: 4.0.3 description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. keywords: diff --git a/stable/mongodb/templates/statefulset-arbiter-rs.yaml b/stable/mongodb/templates/statefulset-arbiter-rs.yaml index c67f6c988e..ac2840d24e 100644 --- a/stable/mongodb/templates/statefulset-arbiter-rs.yaml +++ b/stable/mongodb/templates/statefulset-arbiter-rs.yaml @@ -37,6 +37,10 @@ spec: fsGroup: {{ .Values.securityContext.fsGroup }} runAsUser: {{ .Values.securityContext.runAsUser }} {{- end }} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end -}} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} diff --git a/stable/mongodb/templates/statefulset-primary-rs.yaml b/stable/mongodb/templates/statefulset-primary-rs.yaml index 06b2086bc0..6e003d3995 100644 --- a/stable/mongodb/templates/statefulset-primary-rs.yaml +++ b/stable/mongodb/templates/statefulset-primary-rs.yaml @@ -42,6 +42,10 @@ spec: fsGroup: {{ .Values.securityContext.fsGroup }} runAsUser: {{ .Values.securityContext.runAsUser }} {{- end }} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end -}} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} diff --git a/stable/mongodb/templates/statefulset-secondary-rs.yaml b/stable/mongodb/templates/statefulset-secondary-rs.yaml index 36a461519d..5109fe3bd2 100644 --- a/stable/mongodb/templates/statefulset-secondary-rs.yaml +++ b/stable/mongodb/templates/statefulset-secondary-rs.yaml @@ -43,6 +43,10 @@ spec: fsGroup: {{ .Values.securityContext.fsGroup }} runAsUser: {{ .Values.securityContext.runAsUser }} {{- end }} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end -}} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }}