-
Notifications
You must be signed in to change notification settings - Fork 20
/
30-deployment.yml
69 lines (69 loc) · 1.89 KB
/
30-deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: eth-bootnode
namespace: data
labels:
app: eth-bootnode
spec:
replicas: 2
revisionHistoryLimit: 1
selector:
matchLabels:
app: eth-bootnode
template:
metadata:
labels:
app: eth-bootnode
spec:
volumes:
- name: data
emptyDir: {}
initContainers:
- name: genkey
image: ethereum/client-go:alltools-v1.9.13
imagePullPolicy: IfNotPresent
command: ["/bin/sh"]
args:
- "-c"
- "bootnode --genkey=/etc/bootnode/node.key"
volumeMounts:
- name: data
mountPath: /etc/bootnode
containers:
- name: bootnode
image: ethereum/client-go:alltools-v1.9.13
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: ".5"
requests:
cpu: "0.25"
command: ["/bin/sh"]
args:
- "-c"
- "bootnode --nodekey=/etc/bootnode/node.key --verbosity=4"
volumeMounts:
- name: data
mountPath: /etc/bootnode
ports:
- name: discovery
containerPort: 30301
protocol: UDP
- name: bootnode-server
image: ethereum/client-go:alltools-v1.9.13
imagePullPolicy: IfNotPresent
command: ["/bin/sh"]
args:
- "-c"
- "while [ 1 ]; do echo -e \"HTTP/1.1 200 OK\n\nenode://$(bootnode -writeaddress --nodekey=/etc/bootnode/node.key)@$(POD_IP):30301\" | nc -l -v -p 8080 || break; done;"
volumeMounts:
- name: data
mountPath: /etc/bootnode
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
ports:
- containerPort: 8080