Resource Limit for LOG
[oom.git] / kubernetes / log / charts / log-elasticsearch / templates / deployment.yaml
index 06e1b6b..5ff01b8 100644 (file)
@@ -59,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:
+{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
             name: {{ .Values.service.name }}
@@ -88,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: