Take latest Rally K8S patch into account
[functest-kubernetes.git] / functest_kubernetes / ims / bono-depl.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: bono
5 spec:
6   replicas: 1
7   selector:
8     matchLabels:
9       service: bono
10   template:
11     metadata:
12       labels:
13         service: bono
14         snmp: enabled
15     spec:
16       initContainers:
17         - name: wait-on-sprout
18           image: {{ dockerhub_repo }}/busybox:1.28
19           command: ['sh', '-c', 'until nslookup sprout; do echo waiting for sprout to start ...; sleep 2; done']
20       containers:
21       - image: "{{ dockerhub_repo }}/ollivier/clearwater-bono:hunter"
22         name: bono
23         ports:
24         - containerPort: 22
25         - containerPort: 3478
26         - containerPort: 5060
27         - containerPort: 5062
28         - containerPort: 5060
29           protocol: "UDP"
30         - containerPort: 5062
31           protocol: "UDP"
32         envFrom:
33         - configMapRef:
34               name: env-vars
35         env:
36         - name: MY_POD_IP
37           valueFrom:
38             fieldRef:
39               fieldPath: status.podIP
40         livenessProbe:
41           exec:
42             command: ["nc", "-z", "-w", "5", "127.0.0.1", "5060"]
43           initialDelaySeconds: 30
44         readinessProbe:
45           tcpSocket:
46             port: 5060
47         livenessProbe:
48           exec:
49             command: ["/bin/bash", "/usr/share/kubernetes/liveness.sh", "3478 5060 5062"]
50           initialDelaySeconds: 30
51         readinessProbe:
52           exec:
53             command: ["/bin/bash", "/usr/share/kubernetes/liveness.sh", "3478 5060 5062"]
54         volumeMounts:
55         - name: bonologs
56           mountPath: /var/log/bono
57       - image: {{ dockerhub_repo }}/busybox:1.28
58         name: tailer
59         command: [ "tail", "-F", "/var/log/bono/bono_current.txt" ]
60         volumeMounts:
61         - name: bonologs
62           mountPath: /var/log/bono
63       volumes:
64       - name: bonologs
65         emptyDir: {}
66       imagePullSecrets:
67       - name: ~
68       restartPolicy: Always