yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 1 | #{{ if not .Values.disablePolicyPdp }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 2 | apiVersion: extensions/v1beta1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | name: pdp |
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: pdp |
| 12 | template: |
| 13 | metadata: |
| 14 | labels: |
| 15 | app: pdp |
| 16 | name: pdp |
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 |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame] | 23 | - pap |
| 24 | env: |
| 25 | - name: NAMESPACE |
| 26 | valueFrom: |
| 27 | fieldRef: |
| 28 | apiVersion: v1 |
| 29 | fieldPath: metadata.namespace |
| 30 | image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}" |
| 31 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 32 | name: pdp-readiness |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 33 | containers: |
| 34 | - command: |
| 35 | - /bin/bash |
| 36 | - ./do-start.sh |
| 37 | - pdp |
Eric Au | cdaafde | 2017-08-31 16:18:11 -0400 | [diff] [blame] | 38 | image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion }}" |
kerenj | 3b697f6 | 2017-08-23 11:21:21 +0000 | [diff] [blame] | 39 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 40 | name: pdp |
| 41 | ports: |
| 42 | - containerPort: 8081 |
| 43 | readinessProbe: |
| 44 | tcpSocket: |
| 45 | port: 8081 |
| 46 | initialDelaySeconds: 5 |
| 47 | periodSeconds: 10 |
| 48 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 49 | - mountPath: /etc/localtime |
| 50 | name: localtime |
| 51 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 52 | - mountPath: /tmp/policy-install/config |
| 53 | name: pe |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 54 | - mountPath: /var/log/onap |
| 55 | name: policy-logs |
| 56 | - mountPath: /tmp/logback.xml |
| 57 | name: policy-logback |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame^] | 58 | subPath: logback.xml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 59 | lifecycle: |
| 60 | postStart: |
| 61 | exec: |
| 62 | command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/servers/pdp/webapps/pdp/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"] |
| 63 | - image: {{ .Values.image.filebeat }} |
| 64 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 65 | name: filebeat-onap |
| 66 | volumeMounts: |
| 67 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 68 | name: filebeat-conf |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame^] | 69 | subPath: filebeat.yml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 70 | - mountPath: /var/log/onap |
| 71 | name: policy-logs |
| 72 | - mountPath: /usr/share/filebeat/data |
| 73 | name: policy-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 74 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 75 | - name: localtime |
| 76 | hostPath: |
| 77 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 78 | - name: filebeat-conf |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame^] | 79 | configMap: |
| 80 | name: policy-filebeat-configmap |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 81 | - name: policy-logs |
| 82 | emptyDir: {} |
| 83 | - name: policy-data-filebeat |
| 84 | emptyDir: {} |
| 85 | - name: policy-logback |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame^] | 86 | configMap: |
| 87 | name: policy-pdp-log-configmap |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 88 | - name: pe |
vaibhav_16dec | 8de39a7 | 2018-01-17 12:22:52 +0000 | [diff] [blame^] | 89 | configMap: |
| 90 | name: policy-dep-pe-configmap |
| 91 | defaultMode: 0755 |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 92 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 93 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame] | 94 | #{{ end }} |