blob: 83179fafc961ecaf549396f6cf95b265d3429ddd [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
vasundhra86243b72017-11-22 11:56:23 +000026 env:
27 - name: NAMESPACE
28 valueFrom:
29 fieldRef:
30 apiVersion: v1
31 fieldPath: metadata.namespace
32 image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
33 imagePullPolicy: {{ .Values.pullPolicy }}
34 name: drools-readiness
Alexis de Talhouƫtdf4db0b2017-12-11 08:36:25 -050035 hostAliases:
36 - ip: "{{ .Values.aaiServiceClusterIp }}"
37 hostnames:
38 - "aai.api.simpledemo.openecomp.org"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040039 containers:
40 - command:
41 - /bin/bash
42 - -c
43 - ./do-start.sh
Eric Aucdaafde2017-08-31 16:18:11 -040044 image: "{{ .Values.image.policyDrools }}:{{ .Values.image.policyDroolsVersion }}"
kerenj3b697f62017-08-23 11:21:21 +000045 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040046 name: drools
47 ports:
48 - containerPort: 6969
49 readinessProbe:
50 tcpSocket:
51 port: 6969
52 initialDelaySeconds: 5
53 periodSeconds: 10
54 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030055 - mountPath: /etc/localtime
56 name: localtime
57 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040058 - mountPath: /tmp/policy-install/config
59 name: drools
60 - mountPath: /usr/share/maven/conf/settings.xml
61 name: drools-settingsxml
yurynd0707be2017-09-27 14:54:18 +030062 - mountPath: /var/log/onap
63 name: policy-logs
64 - mountPath: /tmp/logback.xml
65 name: policy-logback
66 lifecycle:
67 postStart:
68 exec:
69 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"]
70 - image: {{ .Values.image.filebeat }}
71 imagePullPolicy: {{ .Values.pullPolicy }}
72 name: filebeat-onap
73 volumeMounts:
74 - mountPath: /usr/share/filebeat/filebeat.yml
75 name: filebeat-conf
76 - mountPath: /var/log/onap
77 name: policy-logs
78 - mountPath: /usr/share/filebeat/data
79 name: policy-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040080 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030081 - name: localtime
82 hostPath:
83 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030084 - name: filebeat-conf
85 hostPath:
86 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
87 - name: policy-logs
88 emptyDir: {}
89 - name: policy-data-filebeat
90 emptyDir: {}
91 - name: policy-logback
92 hostPath:
93 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/drools/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -040094 - name: drools-settingsxml
95 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000096 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/drools/settings.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -040097 - name: drools
98 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000099 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/drools/
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300100 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000101 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra86243b72017-11-22 11:56:23 +0000102#{{ end }}