diff --git a/k8s/charts/codex/templates/codex-statefulset.yaml b/k8s/charts/codex/templates/codex-statefulset.yaml index b4770cb..99e2988 100644 --- a/k8s/charts/codex/templates/codex-statefulset.yaml +++ b/k8s/charts/codex/templates/codex-statefulset.yaml @@ -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: - | diff --git a/k8s/charts/codex/values.yaml b/k8s/charts/codex/values.yaml index 34ce308..cee38f7 100644 --- a/k8s/charts/codex/values.yaml +++ b/k8s/charts/codex/values.yaml @@ -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.