blob: 6cc442b41726f5bf1c4f74f7ea185e2bd0b20545 [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:
5 name: pdp
Mandeep Khinda0e8f8892017-08-25 03:31:17 +00006 namespace: "{{ .Values.nsPrefix }}-policy"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04007spec:
8 replicas: 1
9 selector:
10 matchLabels:
11 app: pdp
12 template:
13 metadata:
14 labels:
15 app: pdp
16 name: pdp
17 annotations:
18 pod.beta.kubernetes.io/init-containers: '[
19 {
20 "args": [
21 "--container-name",
22 "mariadb",
23 "--container-name",
24 "nexus",
25 "--container-name",
26 "pap"
27 ],
28 "command": [
29 "/root/ready.py"
30 ],
31 "env": [
32 {
33 "name": "NAMESPACE",
34 "valueFrom": {
35 "fieldRef": {
36 "apiVersion": "v1",
37 "fieldPath": "metadata.namespace"
38 }
39 }
40 }
41 ],
Eric Aucdaafde2017-08-31 16:18:11 -040042 "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
kerenj3b697f62017-08-23 11:21:21 +000043 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040044 "name": "pdp-readiness"
45 }
46 ]'
47 spec:
48 containers:
49 - command:
50 - /bin/bash
51 - ./do-start.sh
52 - pdp
Eric Aucdaafde2017-08-31 16:18:11 -040053 image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion }}"
kerenj3b697f62017-08-23 11:21:21 +000054 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040055 name: pdp
56 ports:
57 - containerPort: 8081
58 readinessProbe:
59 tcpSocket:
60 port: 8081
61 initialDelaySeconds: 5
62 periodSeconds: 10
63 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030064 - mountPath: /etc/localtime
65 name: localtime
66 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040067 - mountPath: /tmp/policy-install/config
68 name: pe
yurynd0707be2017-09-27 14:54:18 +030069 - mountPath: /var/log/onap
70 name: policy-logs
71 - mountPath: /tmp/logback.xml
72 name: policy-logback
73 lifecycle:
74 postStart:
75 exec:
76 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"]
77 - image: {{ .Values.image.filebeat }}
78 imagePullPolicy: {{ .Values.pullPolicy }}
79 name: filebeat-onap
80 volumeMounts:
81 - mountPath: /usr/share/filebeat/filebeat.yml
82 name: filebeat-conf
83 - mountPath: /var/log/onap
84 name: policy-logs
85 - mountPath: /usr/share/filebeat/data
86 name: policy-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040087 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030088 - name: localtime
89 hostPath:
90 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030091 - name: filebeat-conf
92 hostPath:
93 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
94 - name: policy-logs
95 emptyDir: {}
96 - name: policy-data-filebeat
97 emptyDir: {}
98 - name: policy-logback
99 hostPath:
100 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/xacml-pdp-rest/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400101 - name: pe
102 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000103 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300104 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000105 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
yurynfcef9942017-10-26 17:10:50 +0300106#{{ end }}