Update yamls (#29)

This commit is contained in:
Alberto Soutullo 2024-05-24 13:59:15 +02:00 committed by GitHub
parent 249f35a970
commit 07ef73dd58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 57 additions and 118 deletions

View File

@ -15,66 +15,42 @@ spec:
labels:
app: zerotenkay-bootstrap
spec:
tolerations:
- key: "zerotesting"
operator: "Equal"
value: "fragment"
effect: "NoSchedule"
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- zerotenkay-bootstrap
topologyKey: "kubernetes.io/hostname"
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "zerotesting"
operator: "In"
values:
- "fragment"
dnsConfig:
searches:
- zerotesting-service.zerotesting.svc.cluster.local
- zerotesting-bootstrap.zerotesting.svc.cluster.local
containers:
- name: waku
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst
image: zorlin/nwaku-jq:v0.26.0
imagePullPolicy: IfNotPresent
readinessProbe:
exec:
command:
- /bin/sh
- -c
- 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}}'
- 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
resources:
requests:
memory: "64Mi"
cpu: "10m"
limits:
memory: "256Mi"
cpu: "200m"
ports:
- containerPort: 8545
- containerPort: 8008
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 --relay=true --rpc-admin=true --keep-alive=true --max-connections=12500 --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 --nat=extip:$IP --pubsub-topic="/waku/2/kubetopic"
- |
/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"

View File

@ -4,7 +4,7 @@ metadata:
name: midstrap
namespace: zerotesting
spec:
replicas: 16
replicas: 40
podManagementPolicy: "Parallel"
serviceName: zerotesting-bootstrap
selector:
@ -15,31 +15,6 @@ spec:
labels:
app: zerotenkay-bootstrap
spec:
tolerations:
- key: "zerotesting"
operator: "Equal"
value: "fragment"
effect: "NoSchedule"
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- zerotenkay-bootstrap
topologyKey: "kubernetes.io/hostname"
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "zerotesting"
operator: "In"
values:
- "fragment"
dnsConfig:
searches:
- zerotesting-service.zerotesting.svc.cluster.local
@ -49,14 +24,15 @@ spec:
emptyDir: {}
initContainers:
- name: grabenr
image: harbor2.riff.cc/localmirror/zorlin/getenr:latest
imagePullPolicy: Always
image: zorlin/getenr:v0.3.0
imagePullPolicy: IfNotPresent
volumeMounts:
- name: enr-data
mountPath: /etc/enr
containers:
- name: waku
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst_wget
image: zorlin/nwaku-jq:v0.26.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8545
- containerPort: 8008
@ -69,7 +45,7 @@ spec:
- /bin/sh
- -c
- >
wget -O - --retry-connrefused http://127.0.0.1:8008/metrics |
curl -s http://127.0.0.1:8008/metrics |
awk '!/^#/ && /^libp2p_gossipsub_healthy_peers_topics /{
print "Found gossipsub:", $0;
if ($2 == 1.0) {
@ -88,8 +64,8 @@ spec:
memory: "64Mi"
cpu: "10m"
limits:
memory: "256Mi"
cpu: "200m"
memory: "768Mi"
cpu: "400m"
env:
- name: IP
valueFrom:
@ -100,5 +76,5 @@ spec:
- -c
- |
. /etc/enr/enr.env
echo $ENR1 $ENR2 $ENR3
/usr/bin/wakunode --relay=true --rpc-admin=true --max-connections=12500 --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"
echo ENRs are $ENR1 $ENR2 $ENR3
/usr/bin/wakunode --relay-peer-exchange=true --peer-exchange=true --relay=true --max-connections=18000 --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"

View File

@ -15,31 +15,6 @@ spec:
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
@ -48,8 +23,8 @@ spec:
emptyDir: {}
initContainers:
- name: grabenr
image: harbor2.riff.cc/localmirror/zorlin/getenr:latest
imagePullPolicy: Always
image: zorlin/getenr:v0.3.0
imagePullPolicy: IfNotPresent
volumeMounts:
- name: enr-data
mountPath: /etc/enr
@ -59,7 +34,8 @@ spec:
- "3"
containers:
- name: waku
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst_wget
image: zorlin/nwaku-jq:v0.26.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8545
- containerPort: 8008
@ -72,7 +48,7 @@ spec:
- /bin/sh
- -c
- >
wget -O - --retry-connrefused http://127.0.0.1:8008/metrics |
curl -s http://127.0.0.1:8008/metrics |
awk '!/^#/ && /^libp2p_gossipsub_healthy_peers_topics /{
print "Found gossipsub:", $0;
if ($2 == 1.0) {
@ -89,10 +65,10 @@ spec:
resources:
requests:
memory: "64Mi"
cpu: "10m"
cpu: "150m"
limits:
memory: "256Mi"
cpu: "200m"
memory: "600Mi"
cpu: "400m"
env:
- name: IP
valueFrom:
@ -103,5 +79,5 @@ spec:
- -c
- |
. /etc/enr/enr.env
echo $ENR1 $ENR2 $ENR3
/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 --nat=extip:${IP} --pubsub-topic="/waku/2/kubetopic"
echo ENRs are $ENR1 $ENR2 $ENR3
nice -n 19 /usr/bin/wakunode --relay-peer-exchange=true --peer-exchange=true --relay=true --max-connections=800 --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"

View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Pod
metadata:
name: publisher
namespace: zerotesting
labels:
app: zerotenkay
spec:
dnsConfig:
searches:
- zerotesting-service.zerotesting.svc.cluster.local
containers:
- name: publisher-container
image: zorlin/publisher:v0.3.0
imagePullPolicy: Always
command:
- sh
- -c
- /bin/sleep infinity

View File

@ -6,22 +6,14 @@ metadata:
labels:
app: zerotenkay
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "zerotesting"
operator: "NotIn"
values:
- "false"
dnsConfig:
searches:
- zerotesting-service.zerotesting.svc.cluster.local
containers:
- name: publisher-container
image: harbor2.riff.cc/localmirror/zorlin/waku-publisher:experimental
image: zorlin/publisher:v0.3.0
imagePullPolicy: Always
command:
- sh
- -c
- python /app/traffic.py --msg-size-kbytes=1 --delay-seconds=20 --debug
- python /app/traffic.py --msg-size-kbytes=1 --delay-seconds=10 --debug