Resource Limits for policy
[oom.git] / kubernetes / policy / charts / pdp / templates / statefulset.yaml
index 367cde4..5bc7b55 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.
@@ -23,7 +24,7 @@ metadata:
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
 spec:
-  serviceName: {{ include "common.fullname" . }}
+  serviceName: {{ include "common.servicename" . }}
   replicas: {{ .Values.replicaCount }}
   selector:
     matchLabels:
@@ -55,8 +56,10 @@ spec:
         - ./do-start.sh
         - pdp
         name: {{ include "common.name" . }}
-        image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}
+        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 }}
@@ -78,8 +81,15 @@ spec:
         - mountPath: /tmp/policy-install/config/base.conf
           name: pe
           subPath: base.conf
-        - mountPath: /tmp/policy-install/config/
+        - mountPath: /tmp/policy-install/config/pdp-tweaks.sh
+          name: pe-pdp
+          subPath: pdp-tweaks.sh
+        - mountPath: /tmp/policy-install/config/pdplp.conf
+          name: pe-pdp
+          subPath: pdplp.conf
+        - mountPath: /tmp/policy-install/config/pdp.conf
           name: pe-pdp
+          subPath: pdp.conf
         - mountPath: /tmp/policy-install/do-start.sh
           name: pe-scripts
           subPath: do-start.sh
@@ -103,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: