Publish helm_vims also based on clearwater-docker
[functest-kubernetes.git] / functest_kubernetes / ims / helm / templates / 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-cassandra
18           image: busybox:1.28
19           command: ['sh', '-c', 'until nslookup cassandra; do echo waiting for cassandra to start ...; sleep 2; done']
20       containers:
21       - image: "{{ .Values.image.path }}-astaire:{{ .Values.image.tag }}"
22         name: astaire
23         ports:
24         - containerPort: 22
25         - containerPort: 11211
26         - containerPort: 11311
27         envFrom:
28         - configMapRef:
29               name: env-vars
30         env:
31         - name: MY_POD_IP
32           valueFrom:
33             fieldRef:
34               fieldPath: status.podIP
35         livenessProbe:
36           tcpSocket:
37             port: 11311
38           periodSeconds: 10
39           failureThreshold: 9
40         readinessProbe:
41           tcpSocket:
42             port: 11311
43         volumeMounts:
44         - name: astairelogs
45           mountPath: /var/log/astaire
46         lifecycle:
47           preStop:
48             exec:
49               command: ["/bin/bash", "-c", "/usr/bin/pre-stop"]
50       - image: busybox:1.28
51         name: tailer
52         command: [ "tail", "-F", "/var/log/astaire/astaire_current.txt" ]
53         volumeMounts:
54         - name: astairelogs
55           mountPath: /var/log/astaire
56       volumes:
57       - name: astairelogs
58         emptyDir: {}
59       imagePullSecrets:
60       - name: ~
61       restartPolicy: Always