Policy 1.1 in Kubernetes
[oom.git] / kubernetes / policy / templates / dep-nexus.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   name: nexus
5   namespace: "{{ .Values.nsPrefix }}-policy"
6 spec:
7   selector:
8     matchLabels:
9       app: nexus
10   template:
11     metadata:
12       labels:
13         app: nexus
14       name: nexus
15       annotations:
16         pod.beta.kubernetes.io/init-containers: '[
17           {
18               "args": [
19                   "--container-name",
20                   "mariadb"
21               ],
22               "command": [
23                   "/root/ready.py"
24               ],
25               "env": [
26                   {
27                       "name": "NAMESPACE",
28                       "valueFrom": {
29                           "fieldRef": {
30                               "apiVersion": "v1",
31                               "fieldPath": "metadata.namespace"
32                           }
33                       }
34                   }
35               ],
36               "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
37               "imagePullPolicy": "{{ .Values.pullPolicy }}",
38               "name": "nexus-readiness"
39           }
40           ]'
41     spec:
42       containers:
43       - command:
44         - /bin/bash
45         - -c
46         - bash -c "/opt/nexus/nexus-2.14.2-01/bin/nexus start && sleep 1000d"
47         image: "{{ .Values.image.policyNexus }}:{{ .Values.image.policyNexusVersion }}"
48         imagePullPolicy: {{ .Values.pullPolicy }}
49         name: nexus
50       imagePullSecrets:
51       - name: "{{ .Values.nsPrefix }}-docker-registry-key"