Merge "[CPS] New Delhi release changes"
[oom.git] / kubernetes / policy / components / policy-api / templates / deployment.yaml
index 580dcdd..8de035e 100755 (executable)
@@ -12,7 +12,11 @@ spec:
           - /app/ready.py
           args:
           - --job-name
+{{ if not .Values.global.postgres.localCluster }}
           - {{ include "common.release" . }}-policy-galera-config
+{{ else }}
+          - {{ include "common.release" . }}-policy-pg-config
+{{ end }}
           env:
           - name: NAMESPACE
             valueFrom:
@@ -22,6 +26,13 @@ spec:
           image: {{ include "repositoryGenerator.image.readiness" . }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           name: {{ include "common.name" . }}-readiness
+          resources:
+            limits:
+              cpu: "100m"
+              memory: "500Mi"
+            requests:
+              cpu: "3m"
+              memory: "20Mi"
         - command:
           - sh
           args:
@@ -74,9 +85,6 @@ spec:
             periodSeconds: {{ .Values.readiness.periodSeconds }}
             timeoutSeconds: {{ .Values.readiness.timeout }}
           volumeMounts:
-          - mountPath: /etc/localtime
-            name: localtime
-            readOnly: true
           - mountPath: /opt/app/policy/api/etc/mounted
             name: apiconfig-processed
           resources: {{ include "common.resources" . | nindent 12 }}
@@ -90,9 +98,6 @@ spec:
         {{- end }}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
-        - name: localtime
-          hostPath:
-             path: /etc/localtime
         - name: apiconfig
           configMap:
             name: {{ include "common.fullname" . }}-configmap
@@ -100,5 +105,4 @@ spec:
         - name: apiconfig-processed
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
+      {{- include "common.imagePullSecrets" . | nindent 6 }}