blob: d3d5ff37387640b9a73ab26d046db2a5a681bf63 [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
vaibhav_16dec8de39a72018-01-17 12:22:52 +000074 subPath: logback.xml
yurynd0707be2017-09-27 14:54:18 +030075 - mountPath: /tmp/logback.xml
76 name: policy-logback
vaibhav_16dec8de39a72018-01-17 12:22:52 +000077 subPath: logback.xml
yurynd0707be2017-09-27 14:54:18 +030078 lifecycle:
79 postStart:
80 exec:
81 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"]
82 - image: {{ .Values.image.filebeat }}
83 imagePullPolicy: {{ .Values.pullPolicy }}
84 name: filebeat-onap
85 volumeMounts:
86 - mountPath: /usr/share/filebeat/filebeat.yml
87 name: filebeat-conf
vaibhav_16dec8de39a72018-01-17 12:22:52 +000088 subPath: filebeat.yml
yurynd0707be2017-09-27 14:54:18 +030089 - mountPath: /var/log/onap
90 name: policy-logs
91 - mountPath: /usr/share/filebeat/data
92 name: policy-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040093 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030094 - name: localtime
95 hostPath:
96 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030097 - name: filebeat-conf
vaibhav_16dec8de39a72018-01-17 12:22:52 +000098 configMap:
99 name: policy-filebeat-configmap
yurynd0707be2017-09-27 14:54:18 +0300100 - name: policy-logs
101 emptyDir: {}
102 - name: policy-data-filebeat
103 emptyDir: {}
104 - name: policy-logback
vaibhav_16dec8de39a72018-01-17 12:22:52 +0000105 configMap:
106 name: policy-pap-log-configmap
yurynd0707be2017-09-27 14:54:18 +0300107 - name: policy-sdk-logback
vaibhav_16dec8de39a72018-01-17 12:22:52 +0000108 configMap:
109 name: policy-sdk-log-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400110 - name: pe
vaibhav_16dec8de39a72018-01-17 12:22:52 +0000111 configMap:
112 name: policy-dep-pe-configmap
113 defaultMode: 0755
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300114 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000115 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra86243b72017-11-22 11:56:23 +0000116#{{ end }}