10ksim/accelerated_deployment/nodes.yaml

99 lines
3.3 KiB
YAML
Raw Normal View History

2024-03-04 11:23:14 +00:00
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nodes
namespace: zerotesting
spec:
replicas: 100
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
command:
- /app/getenr.sh
args:
- "8"
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 | grep -q 'libp2p_gossipsub_healthy_peers_topics 1.0'
successThreshold: 5
initialDelaySeconds: 5
periodSeconds: 3
failureThreshold: 2
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 $ENR4 $ENR5 $ENR6 $ENR7 $ENR8
/usr/bin/wakunode --relay=true --rpc-admin=true --max-connections=500 --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 --discv5-bootstrap-node=$ENR4 --discv5-bootstrap-node=$ENR5 --discv5-bootstrap-node=$ENR6 --discv5-bootstrap-node=$ENR7 --discv5-bootstrap-node=$ENR8 --nat=extip:${IP} --pubsub-topic="/waku/2/kubetopic"