Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with order of environment variables defined in the Vault Hashicorp Helm Chart #582

Open
Surya1285 opened this issue Aug 6, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Surya1285
Copy link

Surya1285 commented Aug 6, 2021

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:

# Paste your user-supplied values here (`helm get values <release>`).
# Be sure to scrub any sensitive values!

Additional context
Add any other context about the problem here.

@Surya1285 Surya1285 added the bug Something isn't working label Aug 6, 2021
@beninghton
Copy link

I have the same behavior, pods in stateful set have different order of env variables, and some pods have all variables expanded, and some of pods have not all variables expanded.
For instance:
VAULT_API_ADDR=http://$(POD_IP):8200
or
VAULT_CLUSTER_ADDR=https://$(HOSTNAME).vault-internal:8201

Because $POD_IP or $HOSTNAME was defined AFTER VAULT_API_ADDR or VAULT_CLUSTER_ADDR in POD(!) manifest.
In Stateful Set manifest the order is correct though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants