Publish helm_vims also based on clearwater-docker
[functest-kubernetes.git] / functest_kubernetes / ims / helm / templates / 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: "{{ .Values.image.path }}-chronos:{{ .Values.image.tag }}"
24         name: chronos
25         ports:
26         - containerPort: 22
27         - containerPort: 7253
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: 7253
39           periodSeconds: 10
40           failureThreshold: 9
41         readinessProbe:
42           tcpSocket:
43             port: 7253
44         volumeMounts:
45         - name: chronoslogs
46           mountPath: /var/log/chronos
47         lifecycle:
48           preStop:
49             exec:
50               command: ["/bin/bash", "-c", "/usr/bin/pre-stop"]
51       - image: busybox:1.28
52         name: tailer
53         command: [ "tail", "-F", "/var/log/chronos/chronos_current.txt" ]
54         volumeMounts:
55         - name: chronoslogs
56           mountPath: /var/log/chronos
57       volumes:
58       - name: chronoslogs
59         emptyDir: {}
60       imagePullSecrets:
61       - name: ~
62       restartPolicy: Always