yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 1 | #{{ if not .Values.disablePolicyDrools }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 2 | apiVersion: extensions/v1beta1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | name: drools |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 6 | namespace: "{{ .Values.nsPrefix }}-policy" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 7 | spec: |
| 8 | replicas: 1 |
| 9 | selector: |
| 10 | matchLabels: |
| 11 | app: drools |
| 12 | template: |
| 13 | metadata: |
| 14 | labels: |
| 15 | app: drools |
| 16 | name: drools |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 17 | spec: |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame] | 18 | 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 41 | containers: |
| 42 | - command: |
| 43 | - /bin/bash |
| 44 | - -c |
| 45 | - ./do-start.sh |
Eric Au | cdaafde | 2017-08-31 16:18:11 -0400 | [diff] [blame] | 46 | image: "{{ .Values.image.policyDrools }}:{{ .Values.image.policyDroolsVersion }}" |
kerenj | 3b697f6 | 2017-08-23 11:21:21 +0000 | [diff] [blame] | 47 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 48 | name: drools |
| 49 | ports: |
| 50 | - containerPort: 6969 |
| 51 | readinessProbe: |
| 52 | tcpSocket: |
| 53 | port: 6969 |
| 54 | initialDelaySeconds: 5 |
| 55 | periodSeconds: 10 |
| 56 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 57 | - mountPath: /etc/localtime |
| 58 | name: localtime |
| 59 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 60 | - mountPath: /tmp/policy-install/config |
| 61 | name: drools |
| 62 | - mountPath: /usr/share/maven/conf/settings.xml |
| 63 | name: drools-settingsxml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 64 | - 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 82 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 83 | - name: localtime |
| 84 | hostPath: |
| 85 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 86 | - 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 96 | - name: drools-settingsxml |
| 97 | hostPath: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 98 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/drools/settings.xml |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 99 | - name: drools |
| 100 | hostPath: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 101 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/drools/ |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 102 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 103 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame] | 104 | #{{ end }} |