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