blob: aeb3d6b323008deb67b0a0363d5ab47fea16fc11 [file] [log] [blame]
Mandeep Khindad6ea9872017-06-24 11:49:37 -04001apiVersion: extensions/v1beta1
2kind: Deployment
3metadata:
4 name: pap
Mandeep Khinda0e8f8892017-08-25 03:31:17 +00005 namespace: "{{ .Values.nsPrefix }}-policy"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04006spec:
7 selector:
8 matchLabels:
9 app: pap
10 template:
11 metadata:
12 labels:
13 app: pap
14 name: pap
15 annotations:
16 pod.beta.kubernetes.io/init-containers: '[
17 {
18 "args": [
19 "--container-name",
20 "nexus",
21 "--container-name",
22 "mariadb"
23 ],
24 "command": [
25 "/root/ready.py"
26 ],
27 "env": [
28 {
29 "name": "NAMESPACE",
30 "valueFrom": {
31 "fieldRef": {
32 "apiVersion": "v1",
33 "fieldPath": "metadata.namespace"
34 }
35 }
36 }
37 ],
Eric Aucdaafde2017-08-31 16:18:11 -040038 "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
kerenj3b697f62017-08-23 11:21:21 +000039 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040040 "name": "pap-readiness"
41 },
42 {
43 "env": [
44 {
45 "name": "POD_IP",
46 "valueFrom": {
47 "fieldRef": {
48 "apiVersion": "v1",
49 "fieldPath": "status.podIP"
50 }
51 }
52 }
53 ],
54 "command": ["/bin/bash", "-c", "echo $POD_IP > /config/ip_addr.txt"],
55 "volumeMounts": [
56 {
57 "mountPath": "/config/",
58 "name": "pe"
59 }
60 ],
kerenj3b697f62017-08-23 11:21:21 +000061 "image": "{{ .Values.image.ubuntu }}",
62 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040063 "name": "generate-ip-addr-txt"
64 }
65 ]'
66 spec:
67 containers:
68 - command:
69 - /bin/bash
70 - ./do-start.sh
71 - pap
Eric Aucdaafde2017-08-31 16:18:11 -040072 image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion }}"
kerenj3b697f62017-08-23 11:21:21 +000073 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040074 name: pap
75 ports:
76 - containerPort: 8443
77 - containerPort: 9091
78 readinessProbe:
79 tcpSocket:
80 port: 9091
81 initialDelaySeconds: 5
82 periodSeconds: 10
83 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030084 - mountPath: /etc/localtime
85 name: localtime
86 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040087 - mountPath: /tmp/policy-install/config/
88 name: pe
yurynd0707be2017-09-27 14:54:18 +030089 - mountPath: /var/log/onap
90 name: policy-logs
91 - mountPath: /tmp/policy-install/logback.xml
92 name: policy-sdk-logback
93 - mountPath: /tmp/logback.xml
94 name: policy-logback
95 lifecycle:
96 postStart:
97 exec:
98 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/servers/pap/webapps/pap/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; export SRC=/tmp/policy-install/logback.xml; export DST=/opt/app/policy/servers/console/webapps/onap/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"]
99 - image: {{ .Values.image.filebeat }}
100 imagePullPolicy: {{ .Values.pullPolicy }}
101 name: filebeat-onap
102 volumeMounts:
103 - mountPath: /usr/share/filebeat/filebeat.yml
104 name: filebeat-conf
105 - mountPath: /var/log/onap
106 name: policy-logs
107 - mountPath: /usr/share/filebeat/data
108 name: policy-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400109 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300110 - name: localtime
111 hostPath:
112 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +0300113 - name: filebeat-conf
114 hostPath:
115 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
116 - name: policy-logs
117 emptyDir: {}
118 - name: policy-data-filebeat
119 emptyDir: {}
120 - name: policy-logback
121 hostPath:
122 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/xacml-pap-rest/logback.xml
123 - name: policy-sdk-logback
124 hostPath:
125 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/ep_sdk_app/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400126 - name: pe
127 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000128 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300129 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000130 - name: "{{ .Values.nsPrefix }}-docker-registry-key"