-
Notifications
You must be signed in to change notification settings - Fork 29
/
geth-ds.yml
82 lines (82 loc) · 2.11 KB
/
geth-ds.yml
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
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: geth
labels:
app: geth
spec:
template:
metadata:
labels:
app: geth
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
spec:
serviceAccount: default
containers:
- name: geth
image: ethereum/client-go
ports:
- containerPort: 8545
- containerPort: 30303
args:
- "--datadir=/var/geth"
- "--networkid=15"
- "--rpc"
- "--rpcaddr=0.0.0.0"
- "--rpcapi=admin,db,eth,debug,miner,net,shh,txpool,personal,web3"
- "--rpccorsdomain=*"
# - "-verbosity=6"
resources:
requests:
cpu: 100m
volumeMounts:
- name: geth-data
mountPath: /var/geth
livenessProbe:
httpGet:
path: /
port: 8545
initialDelaySeconds: 15
timeoutSeconds: 5
- name: geth-auto-peer
image: kairen/auto-peer
env:
- name: SERVICE_NAME
value: "geth"
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
command: [ "/bin/sh", "-c" ]
args:
- "set -e -x; while true; do python /etc/auto_peer.py; sleep 15; done"
# init genesis data
initContainers:
- name: init-genesis
image: ethereum/client-go
args:
- "init"
- "--datadir=/var/geth"
- "/etc/geth/genesis.json"
volumeMounts:
- name: geth-data
mountPath: /var/geth
- name: genesis-cfg
mountPath: /etc/geth/
volumes:
- name: genesis-cfg
configMap:
name: geth-config
- name: geth-data
hostPath:
path: /var/geth
# store to nfs pv
# - name: geth-data
# persistentVolumeClaim:
# claimName: geth-pvc