mirror of
https://github.com/vacp2p/10ksim.git
synced 2025-02-24 20:18:14 +00:00
95 lines
3.3 KiB
YAML
95 lines
3.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: midstrap
|
|
namespace: zerotesting
|
|
spec:
|
|
replicas: 30
|
|
podManagementPolicy: "Parallel"
|
|
serviceName: zerotesting-service
|
|
selector:
|
|
matchLabels:
|
|
app: zerotenkay
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: zerotenkay
|
|
spec:
|
|
tolerations:
|
|
- key: "zerotesting"
|
|
operator: "Equal"
|
|
value: "fragment"
|
|
effect: "NoSchedule"
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 1
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: app
|
|
operator: In
|
|
values:
|
|
- zerotenkay
|
|
topologyKey: "kubernetes.io/hostname"
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: "zerotesting"
|
|
operator: "In"
|
|
values:
|
|
- "fragment"
|
|
dnsConfig:
|
|
searches:
|
|
- zerotesting-service.zerotesting.svc.cluster.local
|
|
volumes:
|
|
- name: enr-data
|
|
emptyDir: {}
|
|
initContainers:
|
|
- name: grabenr
|
|
image: harbor.riff.cc/localmirror/zorlin/getenr:latest
|
|
imagePullPolicy: Always
|
|
volumeMounts:
|
|
- name: enr-data
|
|
mountPath: /etc/enr
|
|
containers:
|
|
- name: waku
|
|
image: harbor.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst_wget
|
|
ports:
|
|
- containerPort: 8545
|
|
- containerPort: 8008
|
|
volumeMounts:
|
|
- name: enr-data
|
|
mountPath: /etc/enr
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- wget -O - --retry-connrefused http://127.0.0.1:8008/metrics | awk '!/^#/ && /^libp2p_gossipsub_healthy_peers_topics /{print "Found gossipsub:", $0; if ($2 == 1.0) {gossipsub_success=1} else {exit 1}} !/^#/ && /^libp2p_peers /{print "Found peers:", $0; if ($2 < 450.0) {peers_success=1} else {exit 1}} END{if (!gossipsub_success || !peers_success) {print "Not all conditions met"; exit 1}}'
|
|
successThreshold: 1
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 1
|
|
failureThreshold: 1
|
|
timeoutSeconds: 5
|
|
resources:
|
|
requests:
|
|
memory: "64Mi"
|
|
cpu: "10m"
|
|
limits:
|
|
memory: "256Mi"
|
|
cpu: "200m"
|
|
env:
|
|
- name: IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
. /etc/enr/enr.env
|
|
echo $ENR1 $ENR2 $ENR3
|
|
/usr/bin/wakunode --relay=true --rpc-admin=true --max-connections=1250 --rpc-address=0.0.0.0 --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 --rpc-address=0.0.0.0 --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"
|