yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 1 | #{{ if not .Values.disablePolicyPap }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 2 | apiVersion: extensions/v1beta1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | name: pap |
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 | selector: |
| 9 | matchLabels: |
| 10 | app: pap |
| 11 | template: |
| 12 | metadata: |
| 13 | labels: |
| 14 | app: pap |
| 15 | name: pap |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 16 | spec: |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame^] | 17 | initContainers: |
| 18 | - command: |
| 19 | - /root/ready.py |
| 20 | args: |
| 21 | - --container-name |
| 22 | - nexus |
| 23 | - --container-name |
| 24 | - mariadb |
| 25 | env: |
| 26 | - name: NAMESPACE |
| 27 | valueFrom: |
| 28 | fieldRef: |
| 29 | apiVersion: v1 |
| 30 | fieldPath: metadata.namespace |
| 31 | image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}" |
| 32 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 33 | name: pap-readiness |
| 34 | - command: ["/bin/bash", "-c", "echo $POD_IP > /config/ip_addr.txt"] |
| 35 | env: |
| 36 | - name: POD_IP |
| 37 | valueFrom: |
| 38 | fieldRef: |
| 39 | apiVersion: v1 |
| 40 | fieldPath: status.podIP |
| 41 | volumeMounts: |
| 42 | - mountPath: /config/ |
| 43 | name: pe |
| 44 | image: {{ .Values.image.ubuntu }} |
| 45 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 46 | name: generate-ip-addr-txt |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 47 | containers: |
| 48 | - command: |
| 49 | - /bin/bash |
| 50 | - ./do-start.sh |
| 51 | - pap |
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: pap |
| 55 | ports: |
| 56 | - containerPort: 8443 |
| 57 | - containerPort: 9091 |
| 58 | readinessProbe: |
| 59 | tcpSocket: |
| 60 | port: 9091 |
| 61 | initialDelaySeconds: 5 |
| 62 | periodSeconds: 10 |
| 63 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 64 | - mountPath: /etc/localtime |
| 65 | name: localtime |
| 66 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 67 | - mountPath: /tmp/policy-install/config/ |
| 68 | name: pe |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 69 | - mountPath: /var/log/onap |
| 70 | name: policy-logs |
| 71 | - mountPath: /tmp/policy-install/logback.xml |
| 72 | name: policy-sdk-logback |
| 73 | - mountPath: /tmp/logback.xml |
| 74 | name: policy-logback |
| 75 | lifecycle: |
| 76 | postStart: |
| 77 | exec: |
| 78 | command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/servers/pap/webapps/pap/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; export SRC=/tmp/policy-install/logback.xml; export DST=/opt/app/policy/servers/console/webapps/onap/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"] |
| 79 | - image: {{ .Values.image.filebeat }} |
| 80 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 81 | name: filebeat-onap |
| 82 | volumeMounts: |
| 83 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 84 | name: filebeat-conf |
| 85 | - mountPath: /var/log/onap |
| 86 | name: policy-logs |
| 87 | - mountPath: /usr/share/filebeat/data |
| 88 | name: policy-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 89 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 90 | - name: localtime |
| 91 | hostPath: |
| 92 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 93 | - name: filebeat-conf |
| 94 | hostPath: |
| 95 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml |
| 96 | - name: policy-logs |
| 97 | emptyDir: {} |
| 98 | - name: policy-data-filebeat |
| 99 | emptyDir: {} |
| 100 | - name: policy-logback |
| 101 | hostPath: |
| 102 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/xacml-pap-rest/logback.xml |
| 103 | - name: policy-sdk-logback |
| 104 | hostPath: |
| 105 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/ep_sdk_app/logback.xml |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 106 | - name: pe |
| 107 | hostPath: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 108 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/ |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 109 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 110 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 86243b7 | 2017-11-22 11:56:23 +0000 | [diff] [blame^] | 111 | #{{ end }} |