blob: 3763b95bb2d871727a470cf816f9a1d9fa0c4b5e [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disablePolicyPdp }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -04002apiVersion: extensions/v1beta1
3kind: Deployment
4metadata:
5 name: pdp
Mandeep Khinda0e8f8892017-08-25 03:31:17 +00006 namespace: "{{ .Values.nsPrefix }}-policy"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04007spec:
8 replicas: 1
9 selector:
10 matchLabels:
11 app: pdp
12 template:
13 metadata:
14 labels:
15 app: pdp
16 name: pdp
Mandeep Khindad6ea9872017-06-24 11:49:37 -040017 spec:
vasundhra86243b72017-11-22 11:56:23 +000018 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 Khindad6ea9872017-06-24 11:49:37 -040037 containers:
38 - command:
39 - /bin/bash
40 - ./do-start.sh
41 - pdp
Eric Aucdaafde2017-08-31 16:18:11 -040042 image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion }}"
kerenj3b697f62017-08-23 11:21:21 +000043 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040044 name: pdp
45 ports:
46 - containerPort: 8081
47 readinessProbe:
48 tcpSocket:
49 port: 8081
50 initialDelaySeconds: 5
51 periodSeconds: 10
52 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030053 - mountPath: /etc/localtime
54 name: localtime
55 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040056 - mountPath: /tmp/policy-install/config
57 name: pe
yurynd0707be2017-09-27 14:54:18 +030058 - 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 Khindad6ea9872017-06-24 11:49:37 -040076 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030077 - name: localtime
78 hostPath:
79 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030080 - 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 Khindad6ea9872017-06-24 11:49:37 -040090 - name: pe
91 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000092 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
Borislav Glozman5197e2e2017-07-24 10:45:28 +030093 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000094 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra86243b72017-11-22 11:56:23 +000095#{{ end }}