Skip to content

bug: Missing consensus config volume in StatefulSet causes pod failure when consensus.enabled=true #33

Description

@Sertug17

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions