c5ea267ba511335fdee8f32d21015e70ff8b06de
[oom.git] / kubernetes / policy / templates / dep-pdp.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   name: pdp
5   namespace: "{{ .Values.nsPrefix }}-policy"
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               ],
41               "image": "{{ .Values.image.readiness }}",
42               "imagePullPolicy": "{{ .Values.pullPolicy }}",
43               "name": "pdp-readiness"
44           }
45           ]'
46     spec:
47       containers:
48       - command:
49         - /bin/bash
50         - ./do-start.sh
51         - pdp
52         image: {{ .Values.image.policyPe }}
53         imagePullPolicy: {{ .Values.pullPolicy }}
54         name: pdp
55         ports:
56         - containerPort: 8081
57         readinessProbe:
58           tcpSocket:
59             port: 8081
60           initialDelaySeconds: 5
61           periodSeconds: 10
62         volumeMounts:
63         - mountPath: /tmp/policy-install/config
64           name: pe
65       volumes:
66         - name: pe
67           hostPath:
68             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
69       imagePullSecrets:
70       - name: "{{ .Values.nsPrefix }}-docker-registry-key"