-
Notifications
You must be signed in to change notification settings - Fork 3
/
membernode-statefulset.yaml
114 lines (111 loc) · 3.11 KB
/
membernode-statefulset.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
apiVersion: v1
kind: Service
metadata:
name: geth-membernode-svc
spec:
selector:
role: membernode
type: NodePort
ports:
- name: membernode-gossip
protocol: TCP
port: 30304
targetPort: 30304
nodePort: 30304
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: membernode
spec:
serviceName: 'membernode'
replicas: 1
template:
metadata:
labels:
role: membernode
environment: production
spec:
terminationGracePeriodSeconds: 10
containers:
- name: node
image: xinfinorg/quorum:istanbul-tools-k8s
imagePullPolicy: IfNotPresent
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
args:
- "geth"
- "--datadir"
- "/qdata/dd"
- "--networkid"
- "2017"
- "--port"
- "30304"
- "--bootnodes"
- "enode://209eec26c79aa31e6397b6e12ed30b37df39392efaf698d509cd1be0ff73edf84cbb22bb5f304c16f63fb501edd6e28d232b93d959a0f6b06db00b764874c9ed@10.244.2.155:30301"
- "--rpc"
- "--rpccorsdomain"
- "*"
- "--rpcaddr"
- "0.0.0.0"
- "--rpcapi"
- "admin,db,eth,debug,net,shh,txpool,personal,web3,quorum,istanbul"
- "--rpcport"
- "8545"
- "--etherbase"
- "0x3d2a20faee28bcda3a047079b0bb4a1a0dfed863"
- "--verbosity"
- "6"
- "--nat"
- "none"
- "--syncmode"
- "full"
- "--istanbul.blockperiod"
- "10"
- "2>&1 >>/qdata/geth.log"
ports:
- containerPort: 30304
protocol: TCP
name: geth-tcp
- containerPort: 30304
protocol: UDP
name: geth-udp
- containerPort: 8545
- containerPort: 8546
volumeMounts:
- mountPath: /qdata
name: geth-persistent-volume
initContainers:
- name: init-genesis
image: xinfinorg/quorum:istanbul-tools-k8s
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args:
- "-c"
- cp /var/geth/genesis.json /qdata/genesis.json --remove-destination;
geth --datadir /qdata/dd init /qdata/genesis.json;
volumeMounts:
- name: geth-persistent-volume
mountPath: /qdata
- name: genesis
mountPath: /var/geth
volumes:
- name: genesis
configMap:
name: genesis-geth-config
volumeClaimTemplates:
- metadata:
name: geth-persistent-volume
spec:
storageClassName: manual
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi
selector:
matchLabels:
type: local