c63e0af685f83ffa47da2b7920dc6cfe9b594bd6
[oom.git] / kubernetes / policy / templates / dep-nexus.yaml
1 #{{ if not .Values.disablePolicyNexus }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: policy-nexus
6   namespace: "{{ .Values.nsPrefix }}"
7 spec:
8   replicas: {{ .Values.nexusReplicas }}
9   selector:
10     matchLabels:
11       app: nexus
12   template:
13     metadata:
14       labels:
15         app: nexus
16       name: policy-nexus
17     spec:
18       initContainers:
19       - command:
20         - /root/ready.py
21         args:
22         - --container-name
23         - mariadb
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: nexus-readiness
33       containers:
34       - image: "{{ .Values.image.policyNexus }}:{{ .Values.image.policyNexusVersion }}"
35         imagePullPolicy: {{ .Values.pullPolicy }}
36         name: nexus
37         volumeMounts:
38         - name: localtime
39           mountPath: /etc/localtime
40           readOnly: true
41       volumes:
42       - name: localtime
43         hostPath:
44           path: /etc/localtime
45       imagePullSecrets:
46       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
47 #{{ end }}