Description
When consensus.enabled is set to true in values, the StatefulSet template mounts a volume named consensus-config in the external-node container, but no corresponding volume is ever defined in either the volumes: section (non-persistent mode) or volumeClaimTemplates: (persistent mode). This causes a pod creation failure because Kubernetes cannot find the referenced volume.
Root Cause
configmap-consensus.yaml correctly creates a ConfigMap named {{ fullname }}-consensus with the consensus configuration, but statefulset.yaml never references this ConfigMap as a volume source.
volumeMount exists (statefulset.yaml L272-274):
{{- if .Values.consensus.enabled }}
- name: consensus-secrets
mountPath: /consensus
- name: consensus-config # ← this volume is mounted...
mountPath: /consensus/config.yaml
subPath: config.yaml
{{- end }}
Volume definition is missing — in statefulset.yaml L325-334 (non-persistent path):
volumes:
{{- if (not .Values.persistence.enabled) }}
- name: statekeeper
emptyDir: {}
- name: lightweight
emptyDir: {}
{{- if .Values.consensus.enabled }}
- name: consensus-secrets # ← only this is defined
emptyDir: {}
{{- end }} # ← no consensus-config volume here
The persistent path (volumeClaimTemplates:, L336-381) similarly only defines consensus-secrets, lightweight, and statekeeper — no consensus-config.
Expected Behavior
When consensus.enabled=true, the pod should start successfully with the consensus ConfigMap mounted at /consensus/config.yaml.
Actual Behavior
Pod fails to create with an error similar to:
Error: volume "consensus-config" not found
Suggested Fix
Add a ConfigMap volume reference in the volumes: section for both persistent and non-persistent paths:
{{- if .Values.consensus.enabled }}
- name: consensus-secrets
emptyDir: {}
- name: consensus-config
configMap:
name: {{ include "common.names.fullname" . }}-consensus
{{- end }}
Note: for the persistent path, consensus-config should still be a regular volume (not a PVC), since the ConfigMap is read-only configuration. Only consensus-secrets needs persistence.
Affected Files
charts/abstract-node/templates/statefulset.yaml
Environment
- Chart version: 0.1.48
- Values:
consensus.enabled: true (currently defaults to false, so this only affects users opting in)
Description
When
consensus.enabledis set totruein values, the StatefulSet template mounts a volume namedconsensus-configin the external-node container, but no corresponding volume is ever defined in either thevolumes:section (non-persistent mode) orvolumeClaimTemplates:(persistent mode). This causes a pod creation failure because Kubernetes cannot find the referenced volume.Root Cause
configmap-consensus.yamlcorrectly creates a ConfigMap named{{ fullname }}-consensuswith the consensus configuration, butstatefulset.yamlnever references this ConfigMap as a volume source.volumeMount exists (
statefulset.yamlL272-274):Volume definition is missing — in
statefulset.yamlL325-334 (non-persistent path):The persistent path (
volumeClaimTemplates:, L336-381) similarly only definesconsensus-secrets,lightweight, andstatekeeper— noconsensus-config.Expected Behavior
When
consensus.enabled=true, the pod should start successfully with the consensus ConfigMap mounted at/consensus/config.yaml.Actual Behavior
Pod fails to create with an error similar to:
Error: volume "consensus-config" not found
Suggested Fix
Add a ConfigMap volume reference in the
volumes:section for both persistent and non-persistent paths:Note: for the persistent path,
consensus-configshould still be a regular volume (not a PVC), since the ConfigMap is read-only configuration. Onlyconsensus-secretsneeds persistence.Affected Files
charts/abstract-node/templates/statefulset.yamlEnvironment
consensus.enabled: true(currently defaults tofalse, so this only affects users opting in)