hashicorp / hashicorp/vault-helm
Issue with order of environment variables defined in the Vault Hashicorp Helm Chart
- Dominant language
- Shell
- Stars
- 1.3k
- Forks
- 898
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 1
Description
**Describe the bug**
We are using Official Vault Helm Chart and our vault pods are running as statefulset. We are using the server_statefulset.yaml defined in the Helm chart templates. We noticed that the VAULT_ADDR environment variable is defined before HOSTNAME environment and because of this the VAULT_ADDR is not getting set properly and we are seeing error message like
"Error checking seal status: Get "https://127.0.0.1:8200/v1/sys/seal-status"
Then we copied the statefulset yaml to our local repo and defined the HOSTNAME before VAULT_ADDR and then we are able to see the "vault status" properly. Not sure this is a bug or something. Please check and let us know if something needs to be corrected.
Thank you,
Surya
**To Reproduce**
Steps to reproduce the behavior:
1. Install chart
2. Run vault command
3. See error (vault logs, etc.)
Other useful info to include: vault pod logs, `kubectl describe statefulset vault` and `kubectl get statefulset vault -o yaml` output
**Expected behavior**
A clear and concise description of what you expected to happen.
**Environment**
* Kubernetes version:
* Distribution or cloud vendor (OpenShift, EKS, GKE, AKS, etc.):
* Other configuration options or runtime services (istio, etc.):
* vault-helm version:
Chart values:
```yaml
# Paste your user-supplied values here (`helm get values `).
# Be sure to scrub any sensitive values!
```
**Additional context**
Add any other context about the problem here.
Contributor guide
Research direction
Start with the server_statefulset.yaml template and compare the rendered StatefulSet environment variable order after installing the chart. Reproduce the vault command failure and check whether placing HOSTNAME before VAULT_ADDR changes the result. Done means confirming the cause and correcting the chart if the ordering is responsible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100