Fix policy
[oom.git] / kubernetes / policy / templates / dep-brmsgw.yaml
1 #{{ if not .Values.disablePolicyBrmsgw }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: brmsgw
6   namespace: "{{ .Values.nsPrefix }}-policy"
7 spec:
8   replicas: 1
9   selector:
10     matchLabels:
11       app: brmsgw
12   template:
13     metadata:
14       labels:
15         app: brmsgw
16       name: brmsgw
17       annotations:
18         pod.beta.kubernetes.io/init-containers: '[
19           {
20               "args": [
21                   "--container-name",
22                   "pap"
23               ],
24               "command": [
25                   "/root/ready.py"
26               ],
27               "env": [
28                   {
29                       "name": "NAMESPACE",
30                       "valueFrom": {
31                           "fieldRef": {
32                               "apiVersion": "v1",
33                               "fieldPath": "metadata.namespace"
34                           }
35                       }
36                   }
37               ],
38               "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
39               "imagePullPolicy": "{{ .Values.pullPolicy }}",
40               "name": "brmsgw-readiness"
41           }
42           ]'
43     spec:
44       containers:
45       - command:
46         - /bin/bash
47         - ./do-start.sh
48         - brmsgw
49         image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion}}"
50         imagePullPolicy: {{ .Values.pullPolicy }}
51         name: brmsgw
52         volumeMounts:
53         - mountPath: /etc/localtime
54           name: localtime
55           readOnly: true
56         - mountPath: /tmp/policy-install/config
57           name: pe
58       volumes:
59         - name: localtime
60           hostPath:
61             path: /etc/localtime
62         - name: pe
63           hostPath:
64             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
65       imagePullSecrets:
66       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
67 #{{ end }}