blob: 3e9fa014fba7e3c6636b6e31ef39b08952c6b24f [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disablePolicyDrools }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -04002apiVersion: extensions/v1beta1
3kind: Deployment
4metadata:
5 name: drools
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: drools
12 template:
13 metadata:
14 labels:
15 app: drools
16 name: drools
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 "--container-name",
28 "pdp",
29 "--container-name",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040030 "brmsgw"
31 ],
32 "command": [
33 "/root/ready.py"
34 ],
35 "env": [
36 {
37 "name": "NAMESPACE",
38 "valueFrom": {
39 "fieldRef": {
40 "apiVersion": "v1",
41 "fieldPath": "metadata.namespace"
42 }
43 }
44 }
45 ],
Eric Aucdaafde2017-08-31 16:18:11 -040046 "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
kerenj3b697f62017-08-23 11:21:21 +000047 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040048 "name": "drools-readiness"
49 }
50 ]'
51 spec:
52 containers:
53 - command:
54 - /bin/bash
55 - -c
56 - ./do-start.sh
Eric Aucdaafde2017-08-31 16:18:11 -040057 image: "{{ .Values.image.policyDrools }}:{{ .Values.image.policyDroolsVersion }}"
kerenj3b697f62017-08-23 11:21:21 +000058 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040059 name: drools
60 ports:
61 - containerPort: 6969
62 readinessProbe:
63 tcpSocket:
64 port: 6969
65 initialDelaySeconds: 5
66 periodSeconds: 10
67 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030068 - mountPath: /etc/localtime
69 name: localtime
70 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040071 - mountPath: /tmp/policy-install/config
72 name: drools
73 - mountPath: /usr/share/maven/conf/settings.xml
74 name: drools-settingsxml
yurynd0707be2017-09-27 14:54:18 +030075 - mountPath: /var/log/onap
76 name: policy-logs
77 - mountPath: /tmp/logback.xml
78 name: policy-logback
79 lifecycle:
80 postStart:
81 exec:
82 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/config/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
83 - image: {{ .Values.image.filebeat }}
84 imagePullPolicy: {{ .Values.pullPolicy }}
85 name: filebeat-onap
86 volumeMounts:
87 - mountPath: /usr/share/filebeat/filebeat.yml
88 name: filebeat-conf
89 - 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
98 hostPath:
99 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
100 - name: policy-logs
101 emptyDir: {}
102 - name: policy-data-filebeat
103 emptyDir: {}
104 - name: policy-logback
105 hostPath:
106 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/drools/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400107 - name: drools-settingsxml
108 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000109 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/drools/settings.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400110 - name: drools
111 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000112 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/drools/
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300113 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000114 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
yurynfcef9942017-10-26 17:10:50 +0300115#{{ end }}