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: |
vaibhav_16dec | f785cf3 | 2018-02-15 10:15:44 +0000 | [diff] [blame] | 8 | replicas: {{ .Values.droolsReplicas }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 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 |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame] | 26 | 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ƫt | df4db0b | 2017-12-11 08:36:25 -0500 | [diff] [blame] | 35 | hostAliases: |
| 36 | - ip: "{{ .Values.aaiServiceClusterIp }}" |
| 37 | hostnames: |
| 38 | - "aai.api.simpledemo.openecomp.org" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 39 | containers: |
| 40 | - command: |
| 41 | - /bin/bash |
| 42 | - -c |
| 43 | - ./do-start.sh |
Eric Au | cdaafde | 2017-08-31 16:18:11 -0400 | [diff] [blame] | 44 | image: "{{ .Values.image.policyDrools }}:{{ .Values.image.policyDroolsVersion }}" |
kerenj | 3b697f6 | 2017-08-23 11:21:21 +0000 | [diff] [blame] | 45 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 46 | name: drools |
| 47 | ports: |
| 48 | - containerPort: 6969 |
| 49 | readinessProbe: |
| 50 | tcpSocket: |
| 51 | port: 6969 |
| 52 | initialDelaySeconds: 5 |
| 53 | periodSeconds: 10 |
| 54 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 55 | - mountPath: /etc/localtime |
| 56 | name: localtime |
| 57 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 58 | - mountPath: /tmp/policy-install/config |
| 59 | name: drools |
| 60 | - mountPath: /usr/share/maven/conf/settings.xml |
| 61 | name: drools-settingsxml |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 62 | subPath: settings.xml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 63 | - mountPath: /var/log/onap |
| 64 | name: policy-logs |
| 65 | - mountPath: /tmp/logback.xml |
| 66 | name: policy-logback |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 67 | subPath: logback.xml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 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 |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 78 | subPath: filebeat.yml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 79 | - mountPath: /var/log/onap |
| 80 | name: policy-logs |
| 81 | - mountPath: /usr/share/filebeat/data |
| 82 | name: policy-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 83 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 84 | - name: localtime |
| 85 | hostPath: |
| 86 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 87 | - name: filebeat-conf |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 88 | configMap: |
| 89 | name: policy-filebeat-configmap |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 90 | - name: policy-logs |
| 91 | emptyDir: {} |
| 92 | - name: policy-data-filebeat |
| 93 | emptyDir: {} |
| 94 | - name: policy-logback |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 95 | configMap: |
| 96 | name: policy-drools-log-configmap |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 97 | - name: drools-settingsxml |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 98 | configMap: |
| 99 | name: policy-dep-drools-settings-configmap |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 100 | - name: drools |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 101 | 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 Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 119 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 120 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame] | 121 | #{{ end }} |