feat: add stable bootstrap node

This commit is contained in:
gmega 2025-02-14 14:30:18 -03:00
parent f336df8da7
commit 205f926f89
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18
2 changed files with 8 additions and 5 deletions

View File

@ -5,7 +5,10 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
replicas: {{ .Values.experiment.networkSize }}
# The last node in the statefulset will be used as a stable bootstrap node. Since it's not
# involved in the experiment, it's less likely to crash and cause network partitions which will
# freeze the whole experiment.
replicas: {{ add .Values.experiment.networkSize 1 }}
serviceName: {{ include "codex-nodes.service" . }}
podManagementPolicy: Parallel
selector:
@ -46,9 +49,9 @@ spec:
- containerPort: 6890
resources:
requests:
memory: 6Gi
memory: {{ .Values.experiment.memory | quote }}
limits:
memory: 6Gi
memory: {{ .Values.experiment.memory | quote }}
env:
- name: POD_IP
valueFrom:
@ -77,7 +80,7 @@ spec:
- name: CODEX_LOG_LEVEL
value: {{ .Values.experiment.codexLogLevel }}
- name: BOOTSTRAP_NODE
value: "{{ include "codex-nodes.statefulset" . }}-{{ .Values.experiment.bootstrapNodeIndex }}"
value: "{{ include "codex-nodes.statefulset" . }}-{{ .Values.experiment.networkSize }}"
command: [ "/bin/bash", "--login", "-c" ]
args:
- |

View File

@ -7,8 +7,8 @@ experiment:
blockTTL: 360000
blockMaintenanceInterval: 360000
bootstrapNodeIndex: 0
codexLogLevel: debug
memory: "1Gi"
# Experiments are ran as part of groups which may entail several invocations for this Helm chart.
# We therefore identify both the experiment within a group, and the group itself.