blob: 48ef16e3b2efe48a0339429430233c42abedd949 [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
Mandeep Khindad6ea9872017-06-24 11:49:37 -040017 spec:
vasundhra86243b72017-11-22 11:56:23 +000018 initContainers:
19 - command:
20 - /root/ready.py
21 args:
22 - --container-name
23 - mariadb
24 - --container-name
25 - nexus
26 - --container-name
27 - pap
28 - --container-name
29 - pdp
30 - --container-name
31 - brmsgw
32 env:
33 - name: NAMESPACE
34 valueFrom:
35 fieldRef:
36 apiVersion: v1
37 fieldPath: metadata.namespace
38 image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
39 imagePullPolicy: {{ .Values.pullPolicy }}
40 name: drools-readiness
Mandeep Khindad6ea9872017-06-24 11:49:37 -040041 containers:
42 - command:
43 - /bin/bash
44 - -c
45 - ./do-start.sh
Eric Aucdaafde2017-08-31 16:18:11 -040046 image: "{{ .Values.image.policyDrools }}:{{ .Values.image.policyDroolsVersion }}"
kerenj3b697f62017-08-23 11:21:21 +000047 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040048 name: drools
49 ports:
50 - containerPort: 6969
51 readinessProbe:
52 tcpSocket:
53 port: 6969
54 initialDelaySeconds: 5
55 periodSeconds: 10
56 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030057 - mountPath: /etc/localtime
58 name: localtime
59 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040060 - mountPath: /tmp/policy-install/config
61 name: drools
62 - mountPath: /usr/share/maven/conf/settings.xml
63 name: drools-settingsxml
yurynd0707be2017-09-27 14:54:18 +030064 - mountPath: /var/log/onap
65 name: policy-logs
66 - mountPath: /tmp/logback.xml
67 name: policy-logback
68 lifecycle:
69 postStart:
70 exec:
71 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"]
72 - image: {{ .Values.image.filebeat }}
73 imagePullPolicy: {{ .Values.pullPolicy }}
74 name: filebeat-onap
75 volumeMounts:
76 - mountPath: /usr/share/filebeat/filebeat.yml
77 name: filebeat-conf
78 - mountPath: /var/log/onap
79 name: policy-logs
80 - mountPath: /usr/share/filebeat/data
81 name: policy-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040082 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030083 - name: localtime
84 hostPath:
85 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030086 - name: filebeat-conf
87 hostPath:
88 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
89 - name: policy-logs
90 emptyDir: {}
91 - name: policy-data-filebeat
92 emptyDir: {}
93 - name: policy-logback
94 hostPath:
95 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/drools/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -040096 - name: drools-settingsxml
97 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000098 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/drools/settings.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -040099 - name: drools
100 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000101 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/drools/
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300102 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000103 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra86243b72017-11-22 11:56:23 +0000104#{{ end }}