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 |
| 17 | annotations: |
| 18 | pod.beta.kubernetes.io/init-containers: '[ |
| 19 | { |
| 20 | "args": [ |
| 21 | "--container-name", |
| 22 | "mariadb", |
| 23 | "--container-name", |
| 24 | "nexus", |
| 25 | "--container-name", |
| 26 | "pap", |
| 27 | "--container-name", |
| 28 | "pdp", |
| 29 | "--container-name", |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 30 | "brmsgw" |
| 31 | ], |
| 32 | "command": [ |
| 33 | "/root/ready.py" |
| 34 | ], |
| 35 | "env": [ |
| 36 | { |
| 37 | "name": "NAMESPACE", |
| 38 | "valueFrom": { |
| 39 | "fieldRef": { |
| 40 | "apiVersion": "v1", |
| 41 | "fieldPath": "metadata.namespace" |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | ], |
Eric Au | cdaafde | 2017-08-31 16:18:11 -0400 | [diff] [blame] | 46 | "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}", |
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-readiness" |
| 49 | } |
| 50 | ]' |
| 51 | spec: |
| 52 | containers: |
| 53 | - command: |
| 54 | - /bin/bash |
| 55 | - -c |
| 56 | - ./do-start.sh |
Eric Au | cdaafde | 2017-08-31 16:18:11 -0400 | [diff] [blame] | 57 | image: "{{ .Values.image.policyDrools }}:{{ .Values.image.policyDroolsVersion }}" |
kerenj | 3b697f6 | 2017-08-23 11:21:21 +0000 | [diff] [blame] | 58 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 59 | name: drools |
| 60 | ports: |
| 61 | - containerPort: 6969 |
| 62 | readinessProbe: |
| 63 | tcpSocket: |
| 64 | port: 6969 |
| 65 | initialDelaySeconds: 5 |
| 66 | periodSeconds: 10 |
| 67 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 68 | - mountPath: /etc/localtime |
| 69 | name: localtime |
| 70 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 71 | - mountPath: /tmp/policy-install/config |
| 72 | name: drools |
| 73 | - mountPath: /usr/share/maven/conf/settings.xml |
| 74 | name: drools-settingsxml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 75 | - mountPath: /var/log/onap |
| 76 | name: policy-logs |
| 77 | - mountPath: /tmp/logback.xml |
| 78 | name: policy-logback |
| 79 | lifecycle: |
| 80 | postStart: |
| 81 | exec: |
| 82 | 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"] |
| 83 | - image: {{ .Values.image.filebeat }} |
| 84 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 85 | name: filebeat-onap |
| 86 | volumeMounts: |
| 87 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 88 | name: filebeat-conf |
| 89 | - mountPath: /var/log/onap |
| 90 | name: policy-logs |
| 91 | - mountPath: /usr/share/filebeat/data |
| 92 | name: policy-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 93 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 94 | - name: localtime |
| 95 | hostPath: |
| 96 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 97 | - name: filebeat-conf |
| 98 | hostPath: |
| 99 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml |
| 100 | - name: policy-logs |
| 101 | emptyDir: {} |
| 102 | - name: policy-data-filebeat |
| 103 | emptyDir: {} |
| 104 | - name: policy-logback |
| 105 | hostPath: |
| 106 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/drools/logback.xml |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 107 | - name: drools-settingsxml |
| 108 | hostPath: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 109 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/drools/settings.xml |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 110 | - name: drools |
| 111 | hostPath: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 112 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/drools/ |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 113 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 114 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 115 | #{{ end }} |