blob: 6740f1d422c317b6636b5c5ca1c90be42f08923f [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disablePolicyPdp }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -04002apiVersion: extensions/v1beta1
3kind: Deployment
4metadata:
BorislavG8bfc6cf2018-02-27 15:04:26 +00005 name: policy-pdp
6 namespace: "{{ .Values.nsPrefix }}"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04007spec:
vaibhav_16decf785cf32018-02-15 10:15:44 +00008 replicas: {{ .Values.pdpReplicas }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -04009 selector:
10 matchLabels:
11 app: pdp
12 template:
13 metadata:
14 labels:
15 app: pdp
BorislavG8bfc6cf2018-02-27 15:04:26 +000016 name: policy-pdp
Mandeep Khindad6ea9872017-06-24 11:49:37 -040017 spec:
vasundhra86243b72017-11-22 11:56:23 +000018 initContainers:
19 - command:
20 - /root/ready.py
21 args:
22 - --container-name
vasundhra86243b72017-11-22 11:56:23 +000023 - pap
24 env:
25 - name: NAMESPACE
26 valueFrom:
27 fieldRef:
28 apiVersion: v1
29 fieldPath: metadata.namespace
30 image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
31 imagePullPolicy: {{ .Values.pullPolicy }}
32 name: pdp-readiness
Mandeep Khindad6ea9872017-06-24 11:49:37 -040033 containers:
34 - command:
35 - /bin/bash
36 - ./do-start.sh
37 - pdp
Eric Aucdaafde2017-08-31 16:18:11 -040038 image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion }}"
kerenj3b697f62017-08-23 11:21:21 +000039 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040040 name: pdp
41 ports:
42 - containerPort: 8081
43 readinessProbe:
44 tcpSocket:
45 port: 8081
46 initialDelaySeconds: 5
47 periodSeconds: 10
48 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030049 - mountPath: /etc/localtime
50 name: localtime
51 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040052 - mountPath: /tmp/policy-install/config
53 name: pe
yurynd0707be2017-09-27 14:54:18 +030054 - mountPath: /var/log/onap
55 name: policy-logs
56 - mountPath: /tmp/logback.xml
57 name: policy-logback
vaibhav_16dec8de39a72018-01-17 12:22:52 +000058 subPath: logback.xml
yurynd0707be2017-09-27 14:54:18 +030059 lifecycle:
60 postStart:
61 exec:
62 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/servers/pdp/webapps/pdp/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
63 - image: {{ .Values.image.filebeat }}
64 imagePullPolicy: {{ .Values.pullPolicy }}
65 name: filebeat-onap
66 volumeMounts:
67 - mountPath: /usr/share/filebeat/filebeat.yml
68 name: filebeat-conf
vaibhav_16dec8de39a72018-01-17 12:22:52 +000069 subPath: filebeat.yml
yurynd0707be2017-09-27 14:54:18 +030070 - mountPath: /var/log/onap
71 name: policy-logs
72 - mountPath: /usr/share/filebeat/data
73 name: policy-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040074 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030075 - name: localtime
76 hostPath:
77 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030078 - name: filebeat-conf
vaibhav_16dec8de39a72018-01-17 12:22:52 +000079 configMap:
80 name: policy-filebeat-configmap
yurynd0707be2017-09-27 14:54:18 +030081 - name: policy-logs
82 emptyDir: {}
83 - name: policy-data-filebeat
84 emptyDir: {}
85 - name: policy-logback
vaibhav_16dec8de39a72018-01-17 12:22:52 +000086 configMap:
87 name: policy-pdp-log-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -040088 - name: pe
vaibhav_16dec8de39a72018-01-17 12:22:52 +000089 configMap:
90 name: policy-dep-pe-configmap
91 defaultMode: 0755
Borislav Glozman5197e2e2017-07-24 10:45:28 +030092 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000093 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra86243b72017-11-22 11:56:23 +000094#{{ end }}