Fixes for various settings

This commit is contained in:
Benjamin Arntzen 2024-03-05 20:33:43 +00:00
parent 0b94673cc1
commit ce3a3d878b
4 changed files with 37 additions and 12 deletions

View File

@ -45,18 +45,25 @@ spec:
- zerotesting-service.zerotesting.svc.cluster.local
containers:
- name: waku
image: harbor.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst
readinessProbe:
exec:
command:
- /bin/sh
- -c
- wget -O - http://127.0.0.1:8008/metrics | awk '!/^#/ && /^libp2p_peers /{print "Found peers:", $0; if ($2 < 450.0) {print "Metric below 450, success"; exit 0} else {print "Metric not below 450, failure"; exit 1}}'
- wget -O - 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
resources:
requests:
memory: "64Mi"
cpu: "10m"
limits:
memory: "256Mi"
cpu: "200m"
ports:
- containerPort: 8545
- containerPort: 8008

View File

@ -48,14 +48,14 @@ spec:
emptyDir: {}
initContainers:
- name: grabenr
image: harbor.riff.cc/localmirror/zorlin/getenr:latest
image: harbor2.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
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst_wget
ports:
- containerPort: 8545
- containerPort: 8008
@ -67,7 +67,16 @@ spec:
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 < 280.0) {peers_success=1} else {exit 1}} END{if (!gossipsub_success || !peers_success) {print "Not all conditions met"; exit 1}}'
- >
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) {
exit 0; # success, healthy state
} else {
exit 1; # failure, unhealthy state
}
}'
successThreshold: 1
initialDelaySeconds: 5
periodSeconds: 1
@ -91,4 +100,4 @@ spec:
- |
. /etc/enr/enr.env
echo $ENR1 $ENR2 $ENR3
/usr/bin/wakunode --relay=true --rpc-admin=true --max-connections=300 --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"
/usr/bin/wakunode --relay=true --rpc-admin=true --max-connections=1000 --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"

View File

@ -4,7 +4,7 @@ metadata:
name: nodes
namespace: zerotesting
spec:
replicas: 1000
replicas: 3000
podManagementPolicy: "Parallel"
serviceName: zerotesting-service
selector:
@ -48,7 +48,7 @@ spec:
emptyDir: {}
initContainers:
- name: grabenr
image: harbor.riff.cc/localmirror/zorlin/getenr:latest
image: harbor2.riff.cc/localmirror/zorlin/getenr:latest
imagePullPolicy: Always
volumeMounts:
- name: enr-data
@ -59,7 +59,7 @@ spec:
- "3"
containers:
- name: waku
image: harbor.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst_wget
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst_wget
ports:
- containerPort: 8545
- containerPort: 8008
@ -71,7 +71,16 @@ spec:
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 < 300.0) {peers_success=1} else {exit 1}} END{if (!gossipsub_success || !peers_success) {print "Not all conditions met"; exit 1}}'
- >
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) {
exit 0; # success, healthy state
} else {
exit 1; # failure, unhealthy state
}
}'
successThreshold: 5
initialDelaySeconds: 5
periodSeconds: 1

View File

@ -20,8 +20,8 @@ spec:
- zerotesting-service.zerotesting.svc.cluster.local
containers:
- name: publisher-container
image: harbor.riff.cc/localmirror/zorlin/waku-publisher:experimental
image: harbor2.riff.cc/localmirror/zorlin/waku-publisher:experimental
command:
- sh
- -c
- python /app/traffic.py --msg-size-kbytes=1 --delay-seconds=1 --debug
- python /app/traffic.py --msg-size-kbytes=1 --delay-seconds=5 --debug