Boot Ellis once homestead-depl is ready
[functest-kubernetes.git] / functest_kubernetes / ims / homestead-depl.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: homestead
5 spec:
6   replicas: 1
7   selector:
8     matchLabels:
9       service: homestead
10   template:
11     metadata:
12       labels:
13         service: homestead
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         - name: wait-on-astaire
21           image: busybox:1.28
22           command: ['sh', '-c', 'until nslookup astaire; do echo waiting for astaire to start ...; sleep 2; done']
23       containers:
24       - image: "ollivier/clearwater-homestead:latest"
25         imagePullPolicy: Always
26         name: homestead
27         ports:
28         - containerPort: 22
29         - containerPort: 8888
30         envFrom:
31         - configMapRef:
32               name: env-vars
33         env:
34         - name: MY_POD_IP
35           valueFrom:
36             fieldRef:
37               fieldPath: status.podIP
38         livenessProbe:
39           exec:
40             command: ["/bin/bash", "/usr/share/kubernetes/liveness.sh", "8888"]
41           initialDelaySeconds: 60
42         readinessProbe:
43           exec:
44             command: ["/bin/bash", "/usr/share/kubernetes/liveness.sh", "8888"]
45         volumeMounts:
46         - name: homesteadlogs
47           mountPath: /var/log/homestead
48       - image: busybox
49         name: tailer
50         command: [ "tail", "-F", "/var/log/homestead/homestead_current.txt" ]
51         volumeMounts:
52         - name: homesteadlogs
53           mountPath: /var/log/homestead
54       volumes:
55       - name: homesteadlogs
56         emptyDir: {}
57       imagePullSecrets:
58       - name: ~
59       restartPolicy: Always