-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathlighthouse-deploy.yaml
62 lines (62 loc) · 1.37 KB
/
lighthouse-deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
apiVersion: v1
kind: Namespace
metadata:
name: akka-cqrs
---
apiVersion: v1
kind: Service
metadata:
name: lighthouse
namespace: akka-cqrs
labels:
app: lighthouse
spec:
clusterIP: None
ports:
- port: 4053
selector:
app: lighthouse
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: akka-cqrs
name: lighthouse
labels:
app: lighthouse
spec:
serviceName: lighthouse
replicas: 2
selector:
matchLabels:
app: lighthouse
template:
metadata:
labels:
app: lighthouse
spec:
terminationGracePeriodSeconds: 35
containers:
- name: lighthouse
image: petabridge/lighthouse:latest
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "pbm 127.0.0.1:9110 cluster leave"]
env:
- name: ACTORSYSTEM
value: AkkaTrader
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: CLUSTER_IP
value: "$(POD_NAME).lighthouse"
- name: CLUSTER_SEEDS
value: akka.tcp://$(ACTORSYSTEM)@lighthouse-0.lighthouse:4053,akka.tcp://$(ACTORSYSTEM)@lighthouse-1.lighthouse:4053,akka.tcp://$(ACTORSYSTEM)@lighthouse-2.lighthouse:4053
livenessProbe:
tcpSocket:
port: 4053
ports:
- containerPort: 4053
protocol: TCP