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: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 5 | name: policy-drools |
| 6 | namespace: "{{ .Values.nsPrefix }}" |
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 |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 16 | name: policy-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 |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 58 | - mountPath: /tmp/policy-install/config/policy-keystore |
| 59 | name: drools-secret |
| 60 | subPath: policy-keystore |
| 61 | - mountPath: /tmp/policy-install/config/feature-healthcheck.conf |
| 62 | name: drools-secret |
| 63 | subPath: feature-healthcheck.conf |
| 64 | - mountPath: /tmp/policy-install/config/base.conf |
| 65 | name: drools-config |
| 66 | subPath: base.conf |
| 67 | - mountPath: /tmp/policy-install/config/policy-management.conf |
| 68 | name: drools-config |
| 69 | subPath: policy-management.conf |
| 70 | - mountPath: /tmp/policy-install/config/drools-tweaks.sh |
| 71 | name: drools-config |
| 72 | subPath: drools-tweaks.sh |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 73 | - mountPath: /usr/share/maven/conf/settings.xml |
| 74 | name: drools-settingsxml |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 75 | subPath: settings.xml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 76 | - mountPath: /var/log/onap |
| 77 | name: policy-logs |
| 78 | - mountPath: /tmp/logback.xml |
| 79 | name: policy-logback |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 80 | subPath: logback.xml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 81 | lifecycle: |
| 82 | postStart: |
| 83 | exec: |
| 84 | 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"] |
| 85 | - image: {{ .Values.image.filebeat }} |
| 86 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 87 | name: filebeat-onap |
| 88 | volumeMounts: |
| 89 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 90 | name: filebeat-conf |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 91 | subPath: filebeat.yml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 92 | - mountPath: /var/log/onap |
| 93 | name: policy-logs |
| 94 | - mountPath: /usr/share/filebeat/data |
| 95 | name: policy-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 96 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 97 | - name: localtime |
| 98 | hostPath: |
| 99 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 100 | - name: filebeat-conf |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 101 | configMap: |
| 102 | name: policy-filebeat-configmap |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 103 | - name: policy-logs |
| 104 | emptyDir: {} |
| 105 | - name: policy-data-filebeat |
| 106 | emptyDir: {} |
| 107 | - name: policy-logback |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 108 | configMap: |
| 109 | name: policy-drools-log-configmap |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 110 | - name: drools-settingsxml |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 111 | configMap: |
| 112 | name: policy-dep-drools-settings-configmap |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 113 | - name: drools-config |
| 114 | configMap: |
| 115 | name: policy-dep-drools-configmap |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 116 | items: |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame] | 117 | - key: base.conf |
| 118 | path: base.conf |
| 119 | mode: 0755 |
| 120 | - key: policy-management.conf |
| 121 | path: policy-management.conf |
| 122 | mode: 0755 |
| 123 | - key: drools-tweaks.sh |
| 124 | path: drools-tweaks.sh |
| 125 | mode: 0755 |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 126 | - name: drools-secret |
| 127 | secret: |
| 128 | secretName: policy-dep-drools-secret |
| 129 | items: |
| 130 | - key: policy-keystore |
| 131 | path: policy-keystore |
| 132 | mode: 0644 |
| 133 | - key: feature-healthcheck.conf |
| 134 | path: feature-healthcheck.conf |
| 135 | mode: 0644 |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 136 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 137 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame] | 138 | #{{ end }} |