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: labels:
app: zerotenkay-bootstrap app: zerotenkay-bootstrap
spec: 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: dnsConfig:
searches: searches:
- zerotesting-service.zerotesting.svc.cluster.local - zerotesting-service.zerotesting.svc.cluster.local
- zerotesting-bootstrap.zerotesting.svc.cluster.local - zerotesting-bootstrap.zerotesting.svc.cluster.local
containers: containers:
- name: waku - name: waku
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst image: zorlin/nwaku-jq:v0.26.0
imagePullPolicy: IfNotPresent
readinessProbe: readinessProbe:
exec: exec:
command: command:
- /bin/sh - /bin/sh
- -c - -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 successThreshold: 3
initialDelaySeconds: 1 initialDelaySeconds: 1
periodSeconds: 3 periodSeconds: 3
failureThreshold: 1 failureThreshold: 1
timeoutSeconds: 5 timeoutSeconds: 5
resources:
requests:
memory: "64Mi"
cpu: "10m"
limits:
memory: "256Mi"
cpu: "200m"
ports:
- containerPort: 8545
- containerPort: 8008
env: env:
- name: IP - name: IP
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: status.podIP fieldPath: status.podIP
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "768Mi"
cpu: "400m"
ports:
- containerPort: 8545
- containerPort: 8008
command: command:
- sh - sh
- -c - -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 name: midstrap
namespace: zerotesting namespace: zerotesting
spec: spec:
replicas: 16 replicas: 40
podManagementPolicy: "Parallel" podManagementPolicy: "Parallel"
serviceName: zerotesting-bootstrap serviceName: zerotesting-bootstrap
selector: selector:
@ -15,31 +15,6 @@ spec:
labels: labels:
app: zerotenkay-bootstrap app: zerotenkay-bootstrap
spec: 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: dnsConfig:
searches: searches:
- zerotesting-service.zerotesting.svc.cluster.local - zerotesting-service.zerotesting.svc.cluster.local
@ -49,14 +24,15 @@ spec:
emptyDir: {} emptyDir: {}
initContainers: initContainers:
- name: grabenr - name: grabenr
image: harbor2.riff.cc/localmirror/zorlin/getenr:latest image: zorlin/getenr:v0.3.0
imagePullPolicy: Always imagePullPolicy: IfNotPresent
volumeMounts: volumeMounts:
- name: enr-data - name: enr-data
mountPath: /etc/enr mountPath: /etc/enr
containers: containers:
- name: waku - name: waku
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst_wget image: zorlin/nwaku-jq:v0.26.0
imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 8545 - containerPort: 8545
- containerPort: 8008 - containerPort: 8008
@ -69,7 +45,7 @@ spec:
- /bin/sh - /bin/sh
- -c - -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 /{ awk '!/^#/ && /^libp2p_gossipsub_healthy_peers_topics /{
print "Found gossipsub:", $0; print "Found gossipsub:", $0;
if ($2 == 1.0) { if ($2 == 1.0) {
@ -88,8 +64,8 @@ spec:
memory: "64Mi" memory: "64Mi"
cpu: "10m" cpu: "10m"
limits: limits:
memory: "256Mi" memory: "768Mi"
cpu: "200m" cpu: "400m"
env: env:
- name: IP - name: IP
valueFrom: valueFrom:
@ -100,5 +76,5 @@ spec:
- -c - -c
- | - |
. /etc/enr/enr.env . /etc/enr/enr.env
echo $ENR1 $ENR2 $ENR3 echo ENRs are $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" /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: labels:
app: zerotenkay app: zerotenkay
spec: 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: dnsConfig:
searches: searches:
- zerotesting-service.zerotesting.svc.cluster.local - zerotesting-service.zerotesting.svc.cluster.local
@ -48,8 +23,8 @@ spec:
emptyDir: {} emptyDir: {}
initContainers: initContainers:
- name: grabenr - name: grabenr
image: harbor2.riff.cc/localmirror/zorlin/getenr:latest image: zorlin/getenr:v0.3.0
imagePullPolicy: Always imagePullPolicy: IfNotPresent
volumeMounts: volumeMounts:
- name: enr-data - name: enr-data
mountPath: /etc/enr mountPath: /etc/enr
@ -59,7 +34,8 @@ spec:
- "3" - "3"
containers: containers:
- name: waku - name: waku
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst_wget image: zorlin/nwaku-jq:v0.26.0
imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 8545 - containerPort: 8545
- containerPort: 8008 - containerPort: 8008
@ -72,7 +48,7 @@ spec:
- /bin/sh - /bin/sh
- -c - -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 /{ awk '!/^#/ && /^libp2p_gossipsub_healthy_peers_topics /{
print "Found gossipsub:", $0; print "Found gossipsub:", $0;
if ($2 == 1.0) { if ($2 == 1.0) {
@ -89,10 +65,10 @@ spec:
resources: resources:
requests: requests:
memory: "64Mi" memory: "64Mi"
cpu: "10m" cpu: "150m"
limits: limits:
memory: "256Mi" memory: "600Mi"
cpu: "200m" cpu: "400m"
env: env:
- name: IP - name: IP
valueFrom: valueFrom:
@ -103,5 +79,5 @@ spec:
- -c - -c
- | - |
. /etc/enr/enr.env . /etc/enr/enr.env
echo $ENR1 $ENR2 $ENR3 echo ENRs are $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" 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: labels:
app: zerotenkay app: zerotenkay
spec: spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "zerotesting"
operator: "NotIn"
values:
- "false"
dnsConfig: dnsConfig:
searches: searches:
- zerotesting-service.zerotesting.svc.cluster.local - zerotesting-service.zerotesting.svc.cluster.local
containers: containers:
- name: publisher-container - name: publisher-container
image: harbor2.riff.cc/localmirror/zorlin/waku-publisher:experimental image: zorlin/publisher:v0.3.0
imagePullPolicy: Always
command: command:
- sh - sh
- -c - -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