hashicorp / hashicorp/vault-helm

No way to associate PVC to all pods in HA mode with 3 replica

Open
#845 2 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Shell
Stars
1.3k
Forks
897
Avg merge
3d 1h
Merged PRs (30d)
1

Description

**Describe the bug**
In my values.yaml HA mode is enabled (3 replicas ) and storage used is raft storage. I defined **volumeMounts** and corresponding **volumes** to copy my secret plugin (custom) as show below under **server** section
```
server:
volumes:
- name: plugin-directory
persistentVolumeClaim:
claimName: plugin-pvc
volumeMounts:
- name: plugin-directory
mountPath: "/vault/plugins"
```
When vault is installed first vault pod **vault-0** comes up properly as it is able to mount the path /vault/plugins using PVC plugin-pvc. But second and third vault pod fails giving error.
Multi-Attach error for volume "pvc-5716bcde-cc30-42fb-8482-d3e3ec9e4abd" Volume is already used by pod(s) vault-0

**To Reproduce**
Steps to reproduce the behavior:
1. In value.yaml, enable HA with 3 replicas and define volumes and volumeMounts as above
2. Install vault using helm
3. Only one pod will be in **running** status, rest two will remain in **ContainerCreating** status
4. Run command kubectl describe pod vault-1 -n
Under events you will see error
Multi-Attach error for volume "pvc-5716bcde-cc30-42fb-8482-d3e3ec9e4abd" Volume is already used by pod(s) vault-0

**Expected behavior**
A way to define PVC for all the node like currently helm does by creating PVC **data-vault-x**, where **x** stands for each replica

Contributor guide

Open the contributing guide

Research direction

Start with the Helm chart's server volume configuration and the existing per-replica data-vault-x PVC generation described in the issue. Reproduce the three-replica setup with kubectl and verify that each Vault pod receives usable storage without Multi-Attach errors or remaining in ContainerCreating.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.