mirror of https://github.com/vacp2p/10ksim.git
57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: bootstrap
|
|
namespace: zerotesting
|
|
spec:
|
|
replicas: 3
|
|
podManagementPolicy: "Parallel"
|
|
serviceName: zerotesting-bootstrap
|
|
selector:
|
|
matchLabels:
|
|
app: zerotenkay-bootstrap
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: zerotenkay-bootstrap
|
|
spec:
|
|
dnsConfig:
|
|
searches:
|
|
- zerotesting-service.zerotesting.svc.cluster.local
|
|
- zerotesting-bootstrap.zerotesting.svc.cluster.local
|
|
containers:
|
|
- name: waku
|
|
image: zorlin/nwaku-jq:v0.26.0
|
|
imagePullPolicy: IfNotPresent
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- curl -s http://127.0.0.1:8008/metrics | awk '!/^#/ && /^libp2p_peers /{print "Found peers:", $0; if ($2 < 4000.0) {print "Metric below 4000, success"; exit 0} else {print "Metric not below 4000, failure"; exit 1}}'
|
|
successThreshold: 3
|
|
initialDelaySeconds: 1
|
|
periodSeconds: 3
|
|
failureThreshold: 1
|
|
timeoutSeconds: 5
|
|
env:
|
|
- name: IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
resources:
|
|
requests:
|
|
memory: "64Mi"
|
|
cpu: "50m"
|
|
limits:
|
|
memory: "768Mi"
|
|
cpu: "400m"
|
|
ports:
|
|
- containerPort: 8545
|
|
- containerPort: 8008
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
/usr/bin/wakunode --rest=true --rest-address=0.0.0.0 --peer-exchange=true --relay=true --keep-alive=true --max-connections=18000 --discv5-discovery=true --discv5-enr-auto-update=True --log-level=INFO --metrics-server=True --metrics-server-address=0.0.0.0 --nat=extip:$IP --pubsub-topic="/waku/2/kubetopic"
|