blob: a19fd247785099b475c25bfde698829b8266d06e [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
vasundhra86243b72017-11-22 11:56:23 +000022 - mariadb
23 env:
24 - name: NAMESPACE
25 valueFrom:
26 fieldRef:
27 apiVersion: v1
28 fieldPath: metadata.namespace
29 image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
30 imagePullPolicy: {{ .Values.pullPolicy }}
31 name: pap-readiness
32 - command: ["/bin/bash", "-c", "echo $POD_IP > /config/ip_addr.txt"]
33 env:
34 - name: POD_IP
35 valueFrom:
36 fieldRef:
37 apiVersion: v1
38 fieldPath: status.podIP
39 volumeMounts:
40 - mountPath: /config/
41 name: pe
42 image: {{ .Values.image.ubuntu }}
43 imagePullPolicy: {{ .Values.pullPolicy }}
44 name: generate-ip-addr-txt
Mandeep Khindad6ea9872017-06-24 11:49:37 -040045 containers:
46 - command:
47 - /bin/bash
48 - ./do-start.sh
49 - pap
Eric Aucdaafde2017-08-31 16:18:11 -040050 image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion }}"
kerenj3b697f62017-08-23 11:21:21 +000051 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040052 name: pap
Alexis de Talhouƫtdf4db0b2017-12-11 08:36:25 -050053 env:
54 - name: PRELOAD_POLICIES
55 value: "true"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040056 ports:
57 - containerPort: 8443
58 - containerPort: 9091
59 readinessProbe:
60 tcpSocket:
61 port: 9091
62 initialDelaySeconds: 5
63 periodSeconds: 10
64 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030065 - mountPath: /etc/localtime
66 name: localtime
67 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040068 - mountPath: /tmp/policy-install/config/
69 name: pe
yurynd0707be2017-09-27 14:54:18 +030070 - mountPath: /var/log/onap
71 name: policy-logs
72 - mountPath: /tmp/policy-install/logback.xml
73 name: policy-sdk-logback
74 - mountPath: /tmp/logback.xml
75 name: policy-logback
76 lifecycle:
77 postStart:
78 exec:
79 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"]
80 - image: {{ .Values.image.filebeat }}
81 imagePullPolicy: {{ .Values.pullPolicy }}
82 name: filebeat-onap
83 volumeMounts:
84 - mountPath: /usr/share/filebeat/filebeat.yml
85 name: filebeat-conf
86 - mountPath: /var/log/onap
87 name: policy-logs
88 - mountPath: /usr/share/filebeat/data
89 name: policy-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040090 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030091 - name: localtime
92 hostPath:
93 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030094 - name: filebeat-conf
95 hostPath:
96 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
97 - name: policy-logs
98 emptyDir: {}
99 - name: policy-data-filebeat
100 emptyDir: {}
101 - name: policy-logback
102 hostPath:
103 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/xacml-pap-rest/logback.xml
104 - name: policy-sdk-logback
105 hostPath:
106 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/ep_sdk_app/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400107 - name: pe
108 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000109 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300110 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000111 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra86243b72017-11-22 11:56:23 +0000112#{{ end }}