Merge "[COMMON] Fix handling affinity block for mariadb-galera"
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 31 Aug 2021 12:45:09 +0000 (12:45 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 31 Aug 2021 12:45:09 +0000 (12:45 +0000)
kubernetes/common/common/templates/_affinities.tpl
kubernetes/common/mariadb-galera/templates/statefulset.yaml

index f0802be..bf7ae49 100644 (file)
@@ -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 }}
index 7b0d90a..9227e18 100644 (file)
@@ -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