forked from kairen/kubereum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
geth-ethnetintel-ds.yml
99 lines (99 loc) · 2.59 KB
/
geth-ethnetintel-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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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-ethnetintel
image: kairen/ethnetintel
env:
- name: NAME_PREFIX
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: WS_SERVER
value: "ethstats-dashboard.default.svc.cluster.local:3000"
- name: WS_SECRET
value: "12qw34er"
- name: RPC_HOST
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RPC_PORT
value: "8545"
- 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