Updating charts to use common resource template
[oom.git] / kubernetes / log / charts / log-elasticsearch / templates / deployment.yaml
index fdfc614..fcbe643 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -58,6 +59,8 @@ spec:
         - name: {{ include "common.name" . }}
           image: "{{ .Values.global.loggingRepository | default .Values.loggingRepository }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          resources:
+{{ include "common.resources" . | indent 12 }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
             name: {{ .Values.service.name }}
@@ -87,16 +90,6 @@ spec:
             subPath: elasticsearch.yml
           - mountPath: /usr/share/elasticsearch/data/
             name: {{ include "common.fullname" . }}-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: localtime
           hostPath:
@@ -112,6 +105,6 @@ spec:
             claimName: {{ include "common.fullname" . }}
         - name: {{ include "common.fullname" . }}-logs
           hostPath:
-            path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPathLogs }}
+            path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPathLogs }}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"