Resource Limits for policy
[oom.git] / kubernetes / policy / charts / pdp / templates / statefulset.yaml
index db6a2ad..5bc7b55 100644 (file)
@@ -58,6 +58,8 @@ spec:
         name: {{ include "common.name" . }}
         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        resources:
+{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
         ports:
         - containerPort: {{ .Values.service.externalPort }}
         {{- if eq .Values.liveness.enabled true }}
@@ -111,16 +113,6 @@ spec:
           name: policy-logs
         - mountPath: /usr/share/filebeat/data
           name: policy-data-filebeat
-        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: