Files
status-benchmarks/deployment/codex/status-service-node-codex.yaml
2025-11-13 13:54:07 +01:00

136 lines
4.0 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: status-service-node-codex
namespace: status-go-test
spec:
replicas: 1
podManagementPolicy: "Parallel"
serviceName: status-service-node
selector:
matchLabels:
app: status-service-node
template:
metadata:
labels:
app: status-service-node
spec:
#dnsConfig:
# searches:
# - status-service-node.status-go-test.svc.cluster.local
volumes:
- name: enr-data
emptyDir: {}
- name: postgres-data
emptyDir: {}
initContainers:
- name: grabenr
image: soutullostatus/getenr:v1.1.0
imagePullPolicy: IfNotPresent
volumeMounts:
- name: enr-data
mountPath: /etc/enr
command:
- /app/getenr.sh
args:
- "3"
- "status-service-bootstrap.status-go-test"
containers:
- name: postgres
image: postgres:15.1-alpine
imagePullPolicy: IfNotPresent
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
env:
- name: POSTGRES_DB
value: wakumessages
- name: POSTGRES_USER
value: wakuuser
- name: POSTGRES_PASSWORD
value: wakupassword
ports:
- containerPort: 5432
readinessProbe:
exec:
command:
- sh
- -c
- |
pg_isready -U wakuuser -d wakumessages
initialDelaySeconds: 5
periodSeconds: 2
timeoutSeconds: 5
- name: waku
image: soutullostatus/nwaku-jq-curl:v0.36.0-rc.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8645
- containerPort: 8008
volumeMounts:
- name: enr-data
mountPath: /etc/enr
readinessProbe:
exec:
command:
- /bin/sh
- -c
- "curl -sf http://127.0.0.1:8008/health | grep -q 'OK'"
successThreshold: 5
initialDelaySeconds: 5
periodSeconds: 1
failureThreshold: 2
timeoutSeconds: 5
resources:
requests:
memory: "64Mi"
cpu: "150m"
limits:
memory: "600Mi"
cpu: "400m"
env:
- name: IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: POSTGRES_URL
value: "postgres://wakuuser:wakupassword@127.0.0.1:5432/wakumessages"
command:
- sh
- -c
- |
echo "Waiting for Postgres on 127.0.0.1:5432..."
until curl --silent --output /dev/null --connect-timeout 2 telnet://127.0.0.1:5432; do
echo "Still waiting for Postgres..."
sleep 2
done
echo "Postgres is ready, launching wakunode"
. /etc/enr/ENR
echo ENRs are $ENR1 $ENR2 $ENR3
/usr/bin/wakunode \
--rest=true --rest-admin=true --rest-address=0.0.0.0 \
--relay=true \
--lightpush=true \
--filter=true \
--store=true \
--store-message-db-url=${POSTGRES_URL} \
--store-message-retention-policy="time:90" \
--max-connections=800 \
--discv5-discovery=true \
--discv5-enr-auto-update=True \
--discv5-bootstrap-node=$ENR1 --discv5-bootstrap-node=$ENR2 --discv5-bootstrap-node=$ENR3 \
--log-level=DEBUG \
--metrics-server=True --metrics-server-address=0.0.0.0 \
--nat=extip:$IP \
--cluster-id=16 --shard=32 --shard=64
---
apiVersion: v1
kind: Service
metadata:
name: status-service-node
namespace: status-go-test
spec:
clusterIP: None
selector:
app: status-service-node