e5ec00c1f6292274ba6b369584888b3e27640378
[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       containers:
19       - image: "ollivier/clearwater-chronos:latest"
20         imagePullPolicy: Always
21         name: chronos
22         ports:
23         - containerPort: 22
24         - containerPort: 7253
25         envFrom:
26         - configMapRef:
27               name: env-vars
28         env:
29         - name: MY_POD_IP
30           valueFrom:
31             fieldRef:
32               fieldPath: status.podIP
33         livenessProbe:
34           tcpSocket:
35             port: 7253
36           periodSeconds: 10
37           failureThreshold: 9
38         readinessProbe:
39           tcpSocket:
40             port: 7253
41         volumeMounts:
42         - name: chronoslogs
43           mountPath: /var/log/chronos
44         lifecycle:
45           preStop:
46             exec:
47               command: ["/bin/bash", "-c", "/usr/bin/pre-stop"]
48       - image: busybox
49         name: tailer
50         command: [ "tail", "-F", "/var/log/chronos/chronos_current.txt" ]
51         volumeMounts:
52         - name: chronoslogs
53           mountPath: /var/log/chronos
54       volumes:
55       - name: chronoslogs
56         emptyDir: {}
57       imagePullSecrets:
58       - name: ~
59       restartPolicy: Always