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