82f5f172dbc8a3173679a01d842dd8da48f09e03
[oom.git] / kubernetes / vnfsdk / templates / refrepo-deployment.yaml
1 #{{ if not .Values.disableVnfsdkRefrepo }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   labels:
6     app: refrepo
7   name: refrepo
8   namespace: "{{ .Values.nsPrefix }}-vnfsdk"
9 spec:
10   selector:
11     matchLabels:
12       app: refrepo
13   template:
14     metadata:
15       labels:
16         app: refrepo
17       name: refrepo
18       annotations:
19         pod.beta.kubernetes.io/init-containers: '[
20           {
21               "args": [
22                   "--container-name",
23                   "postgres"
24               ],
25               "command": [
26                   "/root/ready.py"
27               ],
28               "env": [
29                   {
30                       "name": "NAMESPACE",
31                       "valueFrom": {
32                           "fieldRef": {
33                               "apiVersion": "v1",
34                               "fieldPath": "metadata.namespace"
35                           }
36                       }
37                   }
38               ],
39               "image": "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}",
40               "imagePullPolicy": "{{ .Values.pullPolicy }}",
41               "name": "vnfsdk-readiness"
42           }
43           ]'
44     spec:
45       containers:
46       - image: {{ .Values.image.refrepoImage }}:{{ .Values.image.refrepoVersion }}
47         imagePullPolicy: {{ .Values.pullPolicy }}
48         name: refrepo
49         readinessProbe:
50           tcpSocket:
51             port: 8702
52           initialDelaySeconds: 5
53           periodSeconds: 10
54       imagePullSecrets:
55       - name: {{ .Values.nsPrefix }}-docker-registry-key
56 #{{ end }}