Updating charts to use common resource template
[oom.git] / kubernetes / sdc / charts / sdc-es / templates / deployment.yaml
index fe08596..c3d9600 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright © 2017 Amdocs, AT&T, Bell Canada
+# Modifications Copyright © 2018 ZTE
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -51,6 +52,8 @@ spec:
               scheme: HTTP
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
+          resources:
+{{ include "common.resources" . | indent 12 }}
           env:
           - name: ENVNAME
             value: {{ .Values.global.env.name }}
@@ -70,16 +73,6 @@ spec:
             readOnly: true
           - name: {{ include "common.fullname" . }}-data
             mountPath: /usr/share/elasticsearch/data/
-          resources:
-{{ toYaml .Values.resources | indent 12 }}
-        {{- if .Values.nodeSelector }}
-        nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-        {{- end -}}
-        {{- if .Values.affinity }}
-        affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-        {{- end }}
       volumes:
         - name: {{ include "common.fullname" . }}-localtime
           hostPath: