From e4629f3a704d24e79a33fb067fd5677c635b60cb Mon Sep 17 00:00:00 2001 From: Prabhjot Singh Sethi Date: Sat, 21 Aug 2021 11:31:59 +0530 Subject: [PATCH] [COMMON] Fix handling affinity block for mariadb-galera fix matchExpressions under nodeSelectorTerms to indicating array construct. there is no helm tpl defined with common.tplvalues, fixing it to use common.tplValue Issue-ID: OOM-2800 Signed-off-by: Prabhjot Singh Sethi Change-Id: I572ee30af745aa7f10c8438ea9516534e71d5acd --- kubernetes/common/common/templates/_affinities.tpl | 4 ++-- kubernetes/common/mariadb-galera/templates/statefulset.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kubernetes/common/common/templates/_affinities.tpl b/kubernetes/common/common/templates/_affinities.tpl index f0802be29d..bf7ae497ca 100644 --- a/kubernetes/common/common/templates/_affinities.tpl +++ b/kubernetes/common/common/templates/_affinities.tpl @@ -23,7 +23,7 @@ Return a soft nodeAffinity definition preferredDuringSchedulingIgnoredDuringExecution: - preference: matchExpressions: - key: {{ .key }} + - key: {{ .key }} operator: In values: {{- range .values }} @@ -40,7 +40,7 @@ Return a hard nodeAffinity definition requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: {{ .key }} + - key: {{ .key }} operator: In values: {{- range .values }} diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml index 7b0d90a9aa..9227e182b6 100644 --- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml +++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml @@ -223,7 +223,7 @@ spec: {{- end }} serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} {{- if .Values.affinity }} - affinity: {{- include "common.tplvalues" ( dict "value" .Values.affinity "context" $) | nindent 8 }} + affinity: {{- include "common.tplValue" ( dict "value" .Values.affinity "context" $) | nindent 8 }} {{- else }} affinity: podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }} @@ -231,10 +231,10 @@ spec: nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.nodeSelector }} - nodeSelector: {{- include "common.tplvalues" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }} + nodeSelector: {{- include "common.tplValue" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }} {{- end }} {{- if .Values.tolerations }} - tolerations: {{- include "common.tplvalues" (dict "value" .Values.tolerations "context" .) | nindent 8 }} + tolerations: {{- include "common.tplValue" (dict "value" .Values.tolerations "context" .) | nindent 8 }} {{- end }} volumes: - name: previous-boot -- 2.16.6