Manage Ims service dependencies
[functest-kubernetes.git] / functest_kubernetes / ims / sprout-depl.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: sprout
5 spec:
6   replicas: 1
7   selector:
8     matchLabels:
9       service: sprout
10   template:
11     metadata:
12       labels:
13         service: sprout
14         snmp: enabled
15     spec:
16       initContainers:
17         - name: wait-on-cassandra
18           image: busybox:1.28
19           command: ['sh', '-c', 'until nslookup cassandra; do echo waiting for cassandra to start ...; sleep 2; done']
20       containers:
21       - image: "ollivier/clearwater-sprout:latest"
22         imagePullPolicy: Always
23         name: sprout
24         ports:
25         - containerPort: 22
26         envFrom:
27         - configMapRef:
28               name: env-vars
29         env:
30         - name: MY_POD_IP
31           valueFrom:
32             fieldRef:
33               fieldPath: status.podIP
34         livenessProbe:
35           exec:
36             command: ["/bin/bash", "/usr/share/kubernetes/liveness.sh", "5052 5054"]
37           initialDelaySeconds: 30
38           periodSeconds: 3
39         readinessProbe:
40           exec:
41             command: ["/bin/bash", "/usr/share/kubernetes/liveness.sh", "5052 5054"]
42         volumeMounts:
43         - name: sproutlogs
44           mountPath: /var/log/sprout
45       - image: busybox
46         name: tailer
47         command: [ "tail", "-F", "/var/log/sprout/sprout_current.txt" ]
48         volumeMounts:
49         - name: sproutlogs
50           mountPath: /var/log/sprout
51       volumes:
52       - name: sproutlogs
53         emptyDir: {}
54       imagePullSecrets:
55       - name: ~
56       restartPolicy: Always