blob: 523cfd35ffd08fefac9859a08751f6b99f7c5276 [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disablePolicyPap }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -04002apiVersion: extensions/v1beta1
3kind: Deployment
4metadata:
5 name: pap
Mandeep Khinda0e8f8892017-08-25 03:31:17 +00006 namespace: "{{ .Values.nsPrefix }}-policy"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04007spec:
8 selector:
9 matchLabels:
10 app: pap
11 template:
12 metadata:
13 labels:
14 app: pap
15 name: pap
Mandeep Khindad6ea9872017-06-24 11:49:37 -040016 spec:
vasundhra86243b72017-11-22 11:56:23 +000017 initContainers:
18 - command:
19 - /root/ready.py
20 args:
21 - --container-name
22 - nexus
23 - --container-name
24 - mariadb
25 env:
26 - name: NAMESPACE
27 valueFrom:
28 fieldRef:
29 apiVersion: v1
30 fieldPath: metadata.namespace
31 image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
32 imagePullPolicy: {{ .Values.pullPolicy }}
33 name: pap-readiness
34 - command: ["/bin/bash", "-c", "echo $POD_IP > /config/ip_addr.txt"]
35 env:
36 - name: POD_IP
37 valueFrom:
38 fieldRef:
39 apiVersion: v1
40 fieldPath: status.podIP
41 volumeMounts:
42 - mountPath: /config/
43 name: pe
44 image: {{ .Values.image.ubuntu }}
45 imagePullPolicy: {{ .Values.pullPolicy }}
46 name: generate-ip-addr-txt
Mandeep Khindad6ea9872017-06-24 11:49:37 -040047 containers:
48 - command:
49 - /bin/bash
50 - ./do-start.sh
51 - pap
Eric Aucdaafde2017-08-31 16:18:11 -040052 image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion }}"
kerenj3b697f62017-08-23 11:21:21 +000053 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040054 name: pap
55 ports:
56 - containerPort: 8443
57 - containerPort: 9091
58 readinessProbe:
59 tcpSocket:
60 port: 9091
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/policy-install/logback.xml
72 name: policy-sdk-logback
73 - mountPath: /tmp/logback.xml
74 name: policy-logback
75 lifecycle:
76 postStart:
77 exec:
78 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"]
79 - image: {{ .Values.image.filebeat }}
80 imagePullPolicy: {{ .Values.pullPolicy }}
81 name: filebeat-onap
82 volumeMounts:
83 - mountPath: /usr/share/filebeat/filebeat.yml
84 name: filebeat-conf
85 - mountPath: /var/log/onap
86 name: policy-logs
87 - mountPath: /usr/share/filebeat/data
88 name: policy-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040089 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030090 - name: localtime
91 hostPath:
92 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030093 - name: filebeat-conf
94 hostPath:
95 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
96 - name: policy-logs
97 emptyDir: {}
98 - name: policy-data-filebeat
99 emptyDir: {}
100 - name: policy-logback
101 hostPath:
102 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/xacml-pap-rest/logback.xml
103 - name: policy-sdk-logback
104 hostPath:
105 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/ep_sdk_app/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400106 - name: pe
107 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000108 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300109 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000110 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra86243b72017-11-22 11:56:23 +0000111#{{ end }}