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 |
| 23 | - mariadb |
| 24 | - --container-name |
| 25 | - nexus |
| 26 | - --container-name |
| 27 | - pap |
| 28 | env: |
| 29 | - name: NAMESPACE |
| 30 | valueFrom: |
| 31 | fieldRef: |
| 32 | apiVersion: v1 |
| 33 | fieldPath: metadata.namespace |
| 34 | image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}" |
| 35 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 36 | name: pdp-readiness |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 37 | containers: |
| 38 | - command: |
| 39 | - /bin/bash |
| 40 | - ./do-start.sh |
| 41 | - pdp |
Eric Au | cdaafde | 2017-08-31 16:18:11 -0400 | [diff] [blame] | 42 | image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion }}" |
kerenj | 3b697f6 | 2017-08-23 11:21:21 +0000 | [diff] [blame] | 43 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 44 | name: pdp |
| 45 | ports: |
| 46 | - containerPort: 8081 |
| 47 | readinessProbe: |
| 48 | tcpSocket: |
| 49 | port: 8081 |
| 50 | initialDelaySeconds: 5 |
| 51 | periodSeconds: 10 |
| 52 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 53 | - mountPath: /etc/localtime |
| 54 | name: localtime |
| 55 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 56 | - mountPath: /tmp/policy-install/config |
| 57 | name: pe |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 58 | - mountPath: /var/log/onap |
| 59 | name: policy-logs |
| 60 | - mountPath: /tmp/logback.xml |
| 61 | name: policy-logback |
| 62 | lifecycle: |
| 63 | postStart: |
| 64 | exec: |
| 65 | 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"] |
| 66 | - image: {{ .Values.image.filebeat }} |
| 67 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 68 | name: filebeat-onap |
| 69 | volumeMounts: |
| 70 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 71 | name: filebeat-conf |
| 72 | - mountPath: /var/log/onap |
| 73 | name: policy-logs |
| 74 | - mountPath: /usr/share/filebeat/data |
| 75 | name: policy-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 76 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 77 | - name: localtime |
| 78 | hostPath: |
| 79 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 80 | - name: filebeat-conf |
| 81 | hostPath: |
| 82 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml |
| 83 | - name: policy-logs |
| 84 | emptyDir: {} |
| 85 | - name: policy-data-filebeat |
| 86 | emptyDir: {} |
| 87 | - name: policy-logback |
| 88 | hostPath: |
| 89 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/xacml-pdp-rest/logback.xml |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 90 | - name: pe |
| 91 | hostPath: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 92 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/ |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 93 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 94 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame] | 95 | #{{ end }} |