blob: ec0413aac5b5703fcd1296971213bf3ce09f6824 [file] [log] [blame]
vaibhav_16dece04b2fe2018-03-22 09:07:12 +00001# Copyright © 2017 Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
yurynfcef9942017-10-26 17:10:50 +030015#{{ if not .Values.disablePolicyDrools }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040016apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
BorislavG8bfc6cf2018-02-27 15:04:26 +000019 name: policy-drools
20 namespace: "{{ .Values.nsPrefix }}"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040021spec:
vaibhav_16decf785cf32018-02-15 10:15:44 +000022 replicas: {{ .Values.droolsReplicas }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040023 selector:
24 matchLabels:
25 app: drools
26 template:
27 metadata:
28 labels:
29 app: drools
BorislavG8bfc6cf2018-02-27 15:04:26 +000030 name: policy-drools
Mandeep Khindad6ea9872017-06-24 11:49:37 -040031 spec:
vasundhra86243b72017-11-22 11:56:23 +000032 initContainers:
33 - command:
34 - /root/ready.py
35 args:
36 - --container-name
37 - mariadb
38 - --container-name
39 - nexus
vasundhra86243b72017-11-22 11:56:23 +000040 env:
41 - name: NAMESPACE
42 valueFrom:
43 fieldRef:
44 apiVersion: v1
45 fieldPath: metadata.namespace
46 image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
47 imagePullPolicy: {{ .Values.pullPolicy }}
48 name: drools-readiness
Alexis de Talhouëtdf4db0b2017-12-11 08:36:25 -050049 hostAliases:
50 - ip: "{{ .Values.aaiServiceClusterIp }}"
51 hostnames:
52 - "aai.api.simpledemo.openecomp.org"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040053 containers:
54 - command:
55 - /bin/bash
56 - -c
57 - ./do-start.sh
Eric Aucdaafde2017-08-31 16:18:11 -040058 image: "{{ .Values.image.policyDrools }}:{{ .Values.image.policyDroolsVersion }}"
kerenj3b697f62017-08-23 11:21:21 +000059 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040060 name: drools
61 ports:
62 - containerPort: 6969
63 readinessProbe:
64 tcpSocket:
65 port: 6969
66 initialDelaySeconds: 5
67 periodSeconds: 10
68 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030069 - mountPath: /etc/localtime
70 name: localtime
71 readOnly: true
BorislavG8bfc6cf2018-02-27 15:04:26 +000072 - mountPath: /tmp/policy-install/config/policy-keystore
73 name: drools-secret
74 subPath: policy-keystore
75 - mountPath: /tmp/policy-install/config/feature-healthcheck.conf
76 name: drools-secret
77 subPath: feature-healthcheck.conf
78 - mountPath: /tmp/policy-install/config/base.conf
79 name: drools-config
80 subPath: base.conf
81 - mountPath: /tmp/policy-install/config/policy-management.conf
82 name: drools-config
83 subPath: policy-management.conf
84 - mountPath: /tmp/policy-install/config/drools-tweaks.sh
85 name: drools-config
86 subPath: drools-tweaks.sh
Mandeep Khindad6ea9872017-06-24 11:49:37 -040087 - mountPath: /usr/share/maven/conf/settings.xml
88 name: drools-settingsxml
vaibhav_16dec8de39a72018-01-17 12:22:52 +000089 subPath: settings.xml
yurynd0707be2017-09-27 14:54:18 +030090 - mountPath: /var/log/onap
91 name: policy-logs
92 - mountPath: /tmp/logback.xml
93 name: policy-logback
vaibhav_16dec8de39a72018-01-17 12:22:52 +000094 subPath: logback.xml
yurynd0707be2017-09-27 14:54:18 +030095 lifecycle:
96 postStart:
97 exec:
98 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"]
99 - image: {{ .Values.image.filebeat }}
100 imagePullPolicy: {{ .Values.pullPolicy }}
101 name: filebeat-onap
102 volumeMounts:
103 - mountPath: /usr/share/filebeat/filebeat.yml
104 name: filebeat-conf
vaibhav_16dec8de39a72018-01-17 12:22:52 +0000105 subPath: filebeat.yml
yurynd0707be2017-09-27 14:54:18 +0300106 - mountPath: /var/log/onap
107 name: policy-logs
108 - mountPath: /usr/share/filebeat/data
109 name: policy-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400110 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300111 - name: localtime
112 hostPath:
113 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +0300114 - name: filebeat-conf
vaibhav_16dec8de39a72018-01-17 12:22:52 +0000115 configMap:
116 name: policy-filebeat-configmap
yurynd0707be2017-09-27 14:54:18 +0300117 - name: policy-logs
118 emptyDir: {}
119 - name: policy-data-filebeat
120 emptyDir: {}
121 - name: policy-logback
vaibhav_16dec8de39a72018-01-17 12:22:52 +0000122 configMap:
123 name: policy-drools-log-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400124 - name: drools-settingsxml
vaibhav_16dec8de39a72018-01-17 12:22:52 +0000125 configMap:
126 name: policy-dep-drools-settings-configmap
BorislavG8bfc6cf2018-02-27 15:04:26 +0000127 - name: drools-config
128 configMap:
129 name: policy-dep-drools-configmap
vaibhav_16dec8de39a72018-01-17 12:22:52 +0000130 items:
vaibhav_16dec8de39a72018-01-17 12:22:52 +0000131 - key: base.conf
132 path: base.conf
133 mode: 0755
134 - key: policy-management.conf
135 path: policy-management.conf
136 mode: 0755
137 - key: drools-tweaks.sh
138 path: drools-tweaks.sh
139 mode: 0755
BorislavG8bfc6cf2018-02-27 15:04:26 +0000140 - name: drools-secret
141 secret:
142 secretName: policy-dep-drools-secret
143 items:
144 - key: policy-keystore
145 path: policy-keystore
146 mode: 0644
147 - key: feature-healthcheck.conf
148 path: feature-healthcheck.conf
149 mode: 0644
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300150 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000151 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra86243b72017-11-22 11:56:23 +0000152#{{ end }}