blob: 1dc16cf374af423c0c19b59a8707f558950408eb [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:
vaibhav_16decf785cf32018-02-15 10:15:44 +00008 replicas: {{ .Values.droolsReplicas }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -04009 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
vaibhav_16dec8de39a72018-01-17 12:22:52 +000062 subPath: settings.xml
yurynd0707be2017-09-27 14:54:18 +030063 - mountPath: /var/log/onap
64 name: policy-logs
65 - mountPath: /tmp/logback.xml
66 name: policy-logback
vaibhav_16dec8de39a72018-01-17 12:22:52 +000067 subPath: logback.xml
yurynd0707be2017-09-27 14:54:18 +030068 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
vaibhav_16dec8de39a72018-01-17 12:22:52 +000078 subPath: filebeat.yml
yurynd0707be2017-09-27 14:54:18 +030079 - mountPath: /var/log/onap
80 name: policy-logs
81 - mountPath: /usr/share/filebeat/data
82 name: policy-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040083 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030084 - name: localtime
85 hostPath:
86 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030087 - name: filebeat-conf
vaibhav_16dec8de39a72018-01-17 12:22:52 +000088 configMap:
89 name: policy-filebeat-configmap
yurynd0707be2017-09-27 14:54:18 +030090 - name: policy-logs
91 emptyDir: {}
92 - name: policy-data-filebeat
93 emptyDir: {}
94 - name: policy-logback
vaibhav_16dec8de39a72018-01-17 12:22:52 +000095 configMap:
96 name: policy-drools-log-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -040097 - name: drools-settingsxml
vaibhav_16dec8de39a72018-01-17 12:22:52 +000098 configMap:
99 name: policy-dep-drools-settings-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400100 - name: drools
vaibhav_16dec8de39a72018-01-17 12:22:52 +0000101 secret:
102 secretName: policy-dep-drools-secret
103 items:
104 - key: policy-keystore
105 path: policy-keystore
106 mode: 0644
107 - key: feature-healthcheck.conf
108 path: feature-healthcheck.conf
109 mode: 0644
110 - key: base.conf
111 path: base.conf
112 mode: 0755
113 - key: policy-management.conf
114 path: policy-management.conf
115 mode: 0755
116 - key: drools-tweaks.sh
117 path: drools-tweaks.sh
118 mode: 0755
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300119 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000120 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra86243b72017-11-22 11:56:23 +0000121#{{ end }}