Fix nodeSlector and Affinity for aai charts 18/74418/1
authorkranthikirang <kranthi.guttikonda@b-yond.com>
Fri, 7 Dec 2018 21:12:02 +0000 (16:12 -0500)
committerkranthikirang <kranthi.guttikonda@b-yond.com>
Fri, 7 Dec 2018 21:12:38 +0000 (16:12 -0500)
Indentation problem. Correctly placed nodeSelector and Affinity
aligned with Contrainers in template.spec
common.resources do not need indent as indent 12 already present
in return value

Change-Id: Ie0e84fba2f18d903fdcc8bb8f6ff06a4785c0a75
Issue-ID: OOM-1541
Signed-off-by: Kranthi Guttikonda <kranthi.guttikonda@b-yond.com>
Signed-off-by: kranthikirang <kranthi.guttikonda@b-yond.com>
14 files changed:
kubernetes/aai/charts/aai-babel/templates/deployment.yaml
kubernetes/aai/charts/aai-champ/templates/deployment.yaml
kubernetes/aai/charts/aai-data-router/templates/deployment.yaml
kubernetes/aai/charts/aai-elasticsearch/templates/deployment.yaml
kubernetes/aai/charts/aai-gizmo/templates/deployment.yaml
kubernetes/aai/charts/aai-graphadmin/templates/deployment.yaml
kubernetes/aai/charts/aai-graphadmin/templates/job.yaml
kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml
kubernetes/aai/charts/aai-resources/templates/deployment.yaml
kubernetes/aai/charts/aai-search-data/templates/deployment.yaml
kubernetes/aai/charts/aai-sparky-be/templates/deployment.yaml
kubernetes/aai/charts/aai-spike/templates/deployment.yaml
kubernetes/aai/charts/aai-traversal/templates/deployment.yaml
kubernetes/aai/templates/deployment.yaml

index 5ac0792..d450678 100644 (file)
@@ -98,15 +98,15 @@ spec:
             name: {{ include "common.fullname" . }}-config
             subPath: logback.xml
           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 }}
+{{ include "common.resources" . }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
 
         # side car containers
         - name: filebeat-onap
index aa9157f..cad071a 100644 (file)
@@ -114,15 +114,15 @@ spec:
           - mountPath: /var/log/onap
             name: {{ include "common.fullname" . }}-logs
           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 }}
+{{ include "common.resources" . }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
 
         # side car containers
         - name: filebeat-onap
index a7ecbce..5c0d9b2 100644 (file)
@@ -35,6 +35,14 @@ spec:
         release: {{ .Release.Name }}
       name: {{ include "common.name" . }}
     spec:
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
       initContainers:
       - command:
         - /bin/sh
@@ -120,7 +128,7 @@ spec:
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
         resources:
-{{ include "common.resources" . | indent 12 }}
+{{ include "common.resources" . }}
 
       # side car containers
       - name: filebeat-onap
@@ -136,6 +144,8 @@ spec:
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /usr/share/filebeat/data
           name: aai-filebeat
+        resources:
+{{ include "common.resources" . }}
       volumes:
       - name: localtime
         hostPath:
index 586d64f..14b896e 100644 (file)
@@ -95,7 +95,7 @@ spec:
           - name: elasticsearch-data
             mountPath: /usr/share/elasticsearch/data
         resources:
-{{ include "common.resources" . | indent 12 }}
+{{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 8 }}
index 0a30388..5b00ffe 100644 (file)
@@ -105,15 +105,15 @@ spec:
             name: {{ include "common.fullname" . }}-logback-config
             subPath: logback.xml
           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 }}
+{{ include "common.resources" . }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
 
         - name: filebeat-onap
           image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
index 869eac0..abb72f1 100644 (file)
@@ -126,7 +126,7 @@ spec:
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
         resources:
-{{ include "common.resources" . | indent 12 }}
+{{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 8 }}
index cdcf2b1..eb33cc6 100644 (file)
@@ -111,7 +111,7 @@ spec:
           subPath: {{ . }}
           {{ end }}
         resources:
-{{ include "common.resources" . | indent 10 }}
+{{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 8 }}
index 3a81168..f34693f 100644 (file)
@@ -35,6 +35,14 @@ spec:
         release: {{ .Release.Name }}
       name: {{ include "common.name" . }}
     spec:
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
       containers:
       - name: {{ include "common.name" . }}
         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -60,7 +68,7 @@ spec:
         - containerPort: {{ .Values.service.internalPort }}
         - containerPort: {{ .Values.service.internalPort2 }}
         resources:
-{{ include "common.resources" . | indent 12 }}
+{{ include "common.resources" . }}
 
       # side car containers
       - name: filebeat-onap
@@ -74,6 +82,8 @@ spec:
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /usr/share/filebeat/data
           name: aai-filebeat
+        resources:
+{{ include "common.resources" . }}
       volumes:
       - name: localtime
         hostPath:
index 8d7b740..21e502d 100644 (file)
@@ -544,7 +544,7 @@ spec:
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
         resources:
-{{ include "common.resources" . | indent 12 }}
+{{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 8 }}
@@ -566,6 +566,8 @@ spec:
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /usr/share/filebeat/data
           name: {{ include "common.fullname" . }}-filebeat
+        resources:
+{{ include "common.resources" . }}
     {{ if .Values.global.installSidecarSecurity }}
       - name: {{ .Values.global.rproxy.name }}
         image: "{{ include "common.repository" . }}/{{ .Values.global.rproxy.image }}"
index e68a205..1d39d4e 100644 (file)
@@ -93,7 +93,7 @@ spec:
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
         resources:
-{{ include "common.resources" . | indent 12 }}
+{{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 8 }}
index d622be6..0d9e85d 100644 (file)
@@ -125,7 +125,7 @@ spec:
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
         resources:
-{{ include "common.resources" . | indent 12 }}
+{{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 8 }}
@@ -147,6 +147,8 @@ spec:
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /usr/share/filebeat/data
           name: aai-sparky-filebeat
+        resources:
+{{ include "common.resources" . }}
 
       volumes:
       - name: localtime
index a3ff068..c962f1d 100644 (file)
@@ -106,15 +106,15 @@ spec:
           - mountPath: /var/log/onap
             name: {{ include "common.fullname" . }}-logs
           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 }}
+{{ include "common.resources" . }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
 
         # side car containers
         - name: filebeat-onap
@@ -128,6 +128,8 @@ spec:
             name: {{ include "common.fullname" . }}-logs
           - mountPath: /usr/share/filebeat/data
             name: aai-filebeat
+          resources:
+{{ include "common.resources" . }}
 
       volumes:
         - name: localtime
index 834ab32..11950ad 100644 (file)
@@ -358,7 +358,7 @@ spec:
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
         resources:
-{{ include "common.resources" . | indent 12 }}
+{{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 8 }}
@@ -380,6 +380,8 @@ spec:
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /usr/share/filebeat/data
           name: {{ include "common.fullname" . }}-filebeat
+        resources:
+{{ include "common.resources" . }}
       volumes:
       - name: localtime
         hostPath:
index 1f337e4..17680a0 100644 (file)
@@ -101,14 +101,14 @@ spec:
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
         resources:
-{{ include "common.resources" . | indent 12 }}
+{{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
+{{ toYaml .Values.nodeSelector | indent 8 }}
       {{- end -}}
       {{- if .Values.affinity }}
       affinity:
-{{ toYaml .Values.affinity | indent 10 }}
+{{ toYaml .Values.affinity | indent 8 }}
       {{- end }}
 
       volumes: