vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 1 | # 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 | |
yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 15 | #{{ if not .Values.disablePolicyDrools }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 19 | name: policy-drools |
| 20 | namespace: "{{ .Values.nsPrefix }}" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 21 | spec: |
vaibhav_16dec | f785cf3 | 2018-02-15 10:15:44 +0000 | [diff] [blame] | 22 | replicas: {{ .Values.droolsReplicas }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 23 | selector: |
| 24 | matchLabels: |
| 25 | app: drools |
| 26 | template: |
| 27 | metadata: |
| 28 | labels: |
| 29 | app: drools |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 30 | name: policy-drools |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 31 | spec: |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame] | 32 | initContainers: |
| 33 | - command: |
| 34 | - /root/ready.py |
| 35 | args: |
| 36 | - --container-name |
| 37 | - mariadb |
| 38 | - --container-name |
| 39 | - nexus |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame] | 40 | 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ët | df4db0b | 2017-12-11 08:36:25 -0500 | [diff] [blame] | 49 | hostAliases: |
| 50 | - ip: "{{ .Values.aaiServiceClusterIp }}" |
| 51 | hostnames: |
| 52 | - "aai.api.simpledemo.openecomp.org" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 53 | containers: |
| 54 | - command: |
| 55 | - /bin/bash |
| 56 | - -c |
| 57 | - ./do-start.sh |
Eric Au | cdaafde | 2017-08-31 16:18:11 -0400 | [diff] [blame] | 58 | image: "{{ .Values.image.policyDrools }}:{{ .Values.image.policyDroolsVersion }}" |
kerenj | 3b697f6 | 2017-08-23 11:21:21 +0000 | [diff] [blame] | 59 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 60 | name: drools |
| 61 | ports: |
| 62 | - containerPort: 6969 |
| 63 | readinessProbe: |
| 64 | tcpSocket: |
| 65 | port: 6969 |
| 66 | initialDelaySeconds: 5 |
| 67 | periodSeconds: 10 |
| 68 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 69 | - mountPath: /etc/localtime |
| 70 | name: localtime |
| 71 | readOnly: true |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 72 | - 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 87 | - mountPath: /usr/share/maven/conf/settings.xml |
| 88 | name: drools-settingsxml |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 89 | subPath: settings.xml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 90 | - mountPath: /var/log/onap |
| 91 | name: policy-logs |
| 92 | - mountPath: /tmp/logback.xml |
| 93 | name: policy-logback |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 94 | subPath: logback.xml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 95 | 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_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 105 | subPath: filebeat.yml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 106 | - mountPath: /var/log/onap |
| 107 | name: policy-logs |
| 108 | - mountPath: /usr/share/filebeat/data |
| 109 | name: policy-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 110 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 111 | - name: localtime |
| 112 | hostPath: |
| 113 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 114 | - name: filebeat-conf |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 115 | configMap: |
| 116 | name: policy-filebeat-configmap |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 117 | - name: policy-logs |
| 118 | emptyDir: {} |
| 119 | - name: policy-data-filebeat |
| 120 | emptyDir: {} |
| 121 | - name: policy-logback |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 122 | configMap: |
| 123 | name: policy-drools-log-configmap |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 124 | - name: drools-settingsxml |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 125 | configMap: |
| 126 | name: policy-dep-drools-settings-configmap |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 127 | - name: drools-config |
| 128 | configMap: |
| 129 | name: policy-dep-drools-configmap |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 130 | items: |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 131 | - 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 |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 140 | - 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 Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 150 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 151 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame] | 152 | #{{ end }} |