[SDNC] Fix indent level for nodeSelector and affinity 24/122424/4
authorSatoshi Fujii <fujii-satoshi@jp.fujitsu.com>
Sun, 4 Jul 2021 16:39:41 +0000 (16:39 +0000)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Mon, 12 Jul 2021 15:52:11 +0000 (15:52 +0000)
When nodeSelector was given by values or override.yaml, helm deploy
was failed due to wrong indentation in helm charts.

This change fixed indentation level for nodeSelector and affinity
in pod spec.

Issue-ID: SDNC-1565
Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com>
Change-Id: Ie5446928e3f32d9333c04245fc0d2c0f98b3b4e7

kubernetes/sdnc/components/dmaap-listener/templates/deployment.yaml
kubernetes/sdnc/components/sdnc-ansible-server/templates/deployment.yaml
kubernetes/sdnc/components/sdnc-prom/templates/deployment.yaml
kubernetes/sdnc/components/sdnc-web/templates/deployment.yaml
kubernetes/sdnc/components/ueb-listener/templates/deployment.yaml
kubernetes/sdnc/templates/job.yaml
kubernetes/sdnc/templates/statefulset.yaml

index fd45eae..ddc115d 100644 (file)
@@ -107,17 +107,13 @@ spec:
         - mountPath: {{ .Values.config.configDir }}/dmaap-consumer-RANSlice.properties
           name: properties
           subPath: dmaap-consumer-RANSlice.properties
-        resources:
-{{ include "common.resources" . | indent 12 }}
-        {{- if .Values.nodeSelector }}
-        nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-        {{- end -}}
-        {{- if .Values.affinity }}
-        affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-        {{- end }}
-
+        resources: {{ include "common.resources" . | nindent 10 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
+      {{- end }}
+      {{- if .Values.affinity }}
+      affinity: {{ toYaml .Values.affinity | nindent 8 }}
+      {{- end }}
       volumes:
         - name: localtime
           hostPath:
index 41a5c09..3cfb525 100644 (file)
@@ -94,16 +94,13 @@ spec:
           - mountPath: {{ .Values.config.configDir }}/RestServer_config
             name: config
             subPath: RestServer_config
-          resources:
-{{ include "common.resources" . | indent 12 }}
-        {{- if .Values.nodeSelector }}
-        nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-        {{- end -}}
-        {{- if .Values.affinity }}
-        affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-        {{- end }}
+          resources: {{ include "common.resources" . | nindent 12 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
+      {{- end }}
+      {{- if .Values.affinity }}
+      affinity: {{ toYaml .Values.affinity | nindent 8 }}
+      {{- end }}
       volumes:
         - name: localtime
           hostPath:
index 1c9adad..4cf61f5 100644 (file)
@@ -62,17 +62,13 @@ spec:
           mountPath: /app/bin
         - name: core-dns-keyfile
           mountPath: /app/config/coredns
-
-        resources:
-{{ include "common.resources" . | indent 12 }}
-        {{- if .Values.nodeSelector }}
-        nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-        {{- end -}}
-        {{- if .Values.affinity }}
-        affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-        {{- end }}
+        resources: {{ include "common.resources" . | nindent 10 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
+      {{- end }}
+      {{- if .Values.affinity }}
+      affinity: {{ toYaml .Values.affinity | nindent 8 }}
+      {{- end }}
       volumes:
         - name: localtime
           hostPath:
index 7b04773..f168997 100644 (file)
@@ -95,13 +95,12 @@ spec:
             readOnly: true
 
           resources: {{ include "common.resources" . | nindent 12 }}
-        {{- if .Values.nodeSelector }}
-        nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
-        {{- end -}}
-        {{- if .Values.affinity }}
-        affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-        {{- end }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
+      {{- end }}
+      {{- if .Values.affinity }}
+      affinity: {{ toYaml .Values.affinity | nindent 8 }}
+      {{- end }}
       volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
       - name: localtime
         hostPath:
index 385fd9b..911985f 100644 (file)
@@ -94,17 +94,13 @@ spec:
         - mountPath: {{ .Values.config.configDir }}/ueb-listener.properties
           name: properties
           subPath: ueb-listener.properties
-        resources:
-{{ include "common.resources" . | indent 12 }}
-        {{- if .Values.nodeSelector }}
-        nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-        {{- end -}}
-        {{- if .Values.affinity }}
-        affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-        {{- end }}
-
+        resources: {{ include "common.resources" . | nindent 10 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
+      {{- end }}
+      {{- if .Values.affinity }}
+      affinity: {{ toYaml .Values.affinity | nindent 8 }}
+      {{- end }}
       volumes:
         - name: localtime
           hostPath:
index 9f6273d..11b1a87 100755 (executable)
@@ -132,15 +132,12 @@ spec:
           - /bin/bash
         args:
           - {{.Values.config.binDir }}/installSdncDb.sh
-        resources:
-{{ include "common.resources" . | indent 12 }}
+        resources: {{ include "common.resources" . | nindent 10 }}
       {{- if .Values.nodeSelector }}
-      nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-      {{- end -}}
+      nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
+      {{- end }}
       {{- if .Values.affinity }}
-      affinity:
-{{ toYaml .Values.affinity | indent 10 }}
+      affinity: {{ toYaml .Values.affinity | nindent 8 }}
       {{- end }}
       volumes:
       - name: localtime
index f0ee8a9..39407e3 100644 (file)
@@ -380,17 +380,7 @@ spec:
             name: properties
             subPath: oauth-provider.config.json
           {{ end }}
-          resources:
-{{ include "common.resources" . | indent 12 }}
-        {{- if .Values.nodeSelector }}
-        nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-        {{- end -}}
-        {{- if .Values.affinity }}
-        affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-        {{- end }}
-
+          resources: {{ include "common.resources" . | nindent 12 }}
         # side car containers
         - name: filebeat-onap
           image: {{ include "repositoryGenerator.image.logging" . }}
@@ -403,6 +393,12 @@ spec:
             name: logs
           - mountPath: /usr/share/filebeat/data
             name: data-filebeat
+      {{- if .Values.nodeSelector }}
+      nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
+      {{- end }}
+      {{- if .Values.affinity }}
+      affinity: {{ toYaml .Values.affinity | nindent 8 }}
+      {{- end }}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
       volumes: