-
Notifications
You must be signed in to change notification settings - Fork 0
/
leader.yaml
117 lines (107 loc) · 2.74 KB
/
leader.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
apiVersion: v1
kind: ConfigMap
metadata:
name: leader-config
data:
leader.toml: |
user = "firedancer"
dynamic_port_range = "8100-8200"
scratch_directory = "/scratch/fd1"
[development.genesis]
hashes_per_tick = 12500
fund_initial_accounts = 9000
[rpc]
port = 8899
full_api = true
private = false
transaction_history = false
extended_tx_metadata_storage = false
[tiles.net]
interface = "bond0"
xdp_mode = "skb"
[snapshots]
incremental_snapshot_interval_slots = 50
full_snapshot_interval_slots = 100
[tiles.quic]
max_concurrent_streams_per_connection = 3000
max_concurrent_connections = 256
max_concurrent_handshakes = 256
max_inflight_quic_packets = 2500
stream_pool_cnt = 2000000
---
# Point DNS record to leader-0's public IP.
apiVersion: v1
kind: Service
metadata:
name: leader
spec:
selector:
app: leader
clusterIP: None
---
# Leader container.
apiVersion: v1
kind: Pod
metadata:
name: leader-0
labels:
app: leader
xdp: exclusive
spec:
volumes:
- name: leader-config
configMap:
name: leader-config
- name: scratch
emptyDir: { }
containers:
# Main container running Frankendancer.
- image: europe-west3-docker.pkg.dev/monogon-infra/fd-dev/fd-k8s-demo:latest
imagePullPolicy: Always
name: validator
command:
- /usr/local/bin/leader-entrypoint.sh
securityContext:
# Firedancer needs more privileges than what we can
# provide using individual caps.
privileged: true
volumeMounts:
- mountPath: /etc/leader.toml
name: leader-config
subPath: leader.toml
- mountPath: /scratch
name: scratch
# Standalone webserver for serving leader data to followers.
- image: docker.io/caddy:2.8.4-alpine
name: webserver
command:
- /usr/bin/caddy
- file-server
- --browse
- --access-log
- --root
- /usr/share/caddy
- --listen
- :10801
ports:
- containerPort: 10801
volumeMounts:
- mountPath: /usr/share/caddy
name: scratch
# Make sure there's only one AF_XDP pod per node.
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: xdp
operator: In
values:
- exclusive
topologyKey: kubernetes.io/hostname
# We need the host network namespace for AF_XDP.
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
# Uncomment if you want to pin to a specific node for debugging.
#nodeName: metropolis-078e9c92e3a53a784fd8d0ddcf0f5a5e