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