10ksim/deployment/midstrap.yaml

61 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: midstrap
namespace: zerotesting
spec:
replicas: 40
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
volumes:
- name: enr-data
emptyDir: {}
initContainers:
- name: grabenr
image: zorlin/getenr:v0.3.0
imagePullPolicy: IfNotPresent
volumeMounts:
- name: enr-data
mountPath: /etc/enr
containers:
- name: waku
image: soutullostatus/nwaku-jq-curl:v0.28.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8545
- containerPort: 8008
volumeMounts:
- name: enr-data
mountPath: /etc/enr
resources:
requests:
memory: "64Mi"
cpu: "10m"
limits:
memory: "768Mi"
cpu: "400m"
env:
- name: IP
valueFrom:
fieldRef:
fieldPath: status.podIP
command:
- sh
- -c
- |
. /etc/enr/enr.env
echo ENRs are $ENR1 $ENR2 $ENR3
/usr/bin/wakunode --relay=true --max-connections=200 --rest=true --rest-admin=true --rest-private=true --rest-address=0.0.0.0 --discv5-discovery=true --discv5-enr-auto-update=True --log-level=INFO --metrics-server=True --metrics-server-address=0.0.0.0 --discv5-bootstrap-node=$ENR1 --discv5-bootstrap-node=$ENR2 --discv5-bootstrap-node=$ENR3 --nat=extip:${IP} --pubsub-topic="/waku/2/kubetopic"