blob: 1f66396a1c8c4f7ca186c764f711a4f07e72bf11 [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
vasundhra86243b72017-11-22 11:56:23 +000023 - 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 Khindad6ea9872017-06-24 11:49:37 -040033 containers:
34 - command:
35 - /bin/bash
36 - ./do-start.sh
37 - pdp
Eric Aucdaafde2017-08-31 16:18:11 -040038 image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion }}"
kerenj3b697f62017-08-23 11:21:21 +000039 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040040 name: pdp
41 ports:
42 - containerPort: 8081
43 readinessProbe:
44 tcpSocket:
45 port: 8081
46 initialDelaySeconds: 5
47 periodSeconds: 10
48 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030049 - mountPath: /etc/localtime
50 name: localtime
51 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040052 - mountPath: /tmp/policy-install/config
53 name: pe
yurynd0707be2017-09-27 14:54:18 +030054 - mountPath: /var/log/onap
55 name: policy-logs
56 - mountPath: /tmp/logback.xml
57 name: policy-logback
58 lifecycle:
59 postStart:
60 exec:
61 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"]
62 - image: {{ .Values.image.filebeat }}
63 imagePullPolicy: {{ .Values.pullPolicy }}
64 name: filebeat-onap
65 volumeMounts:
66 - mountPath: /usr/share/filebeat/filebeat.yml
67 name: filebeat-conf
68 - mountPath: /var/log/onap
69 name: policy-logs
70 - mountPath: /usr/share/filebeat/data
71 name: policy-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040072 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030073 - name: localtime
74 hostPath:
75 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030076 - name: filebeat-conf
77 hostPath:
78 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
79 - name: policy-logs
80 emptyDir: {}
81 - name: policy-data-filebeat
82 emptyDir: {}
83 - name: policy-logback
84 hostPath:
85 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/xacml-pdp-rest/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -040086 - name: pe
87 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000088 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
Borislav Glozman5197e2e2017-07-24 10:45:28 +030089 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000090 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra86243b72017-11-22 11:56:23 +000091#{{ end }}