Update annotations to spec for vid
[oom.git] / kubernetes / policy / templates / dep-nexus.yaml
1 #{{ if not .Values.disablePolicyNexus }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: nexus
6   namespace: "{{ .Values.nsPrefix }}-policy"
7 spec:
8   selector:
9     matchLabels:
10       app: nexus
11   template:
12     metadata:
13       labels:
14         app: nexus
15       name: nexus
16       annotations:
17         pod.beta.kubernetes.io/init-containers: '[
18           {
19               "args": [
20                   "--container-name",
21                   "mariadb"
22               ],
23               "command": [
24                   "/root/ready.py"
25               ],
26               "env": [
27                   {
28                       "name": "NAMESPACE",
29                       "valueFrom": {
30                           "fieldRef": {
31                               "apiVersion": "v1",
32                               "fieldPath": "metadata.namespace"
33                           }
34                       }
35                   }
36               ],
37               "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
38               "imagePullPolicy": "{{ .Values.pullPolicy }}",
39               "name": "nexus-readiness"
40           }
41           ]'
42     spec:
43       containers:
44       - image: "{{ .Values.image.policyNexus }}:{{ .Values.image.policyNexusVersion }}"
45         imagePullPolicy: {{ .Values.pullPolicy }}
46         name: nexus
47         volumeMounts:
48         - name: localtime
49           mountPath: /etc/localtime
50           readOnly: true
51       volumes:
52       - name: localtime
53         hostPath:
54           path: /etc/localtime
55       imagePullSecrets:
56       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
57 #{{ end }}