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

Cannot use HOSTNAME env var in VAULT_API_ADDR env var #993

Closed
raphaelzoellner opened this issue Jan 19, 2024 · 0 comments
Closed

Cannot use HOSTNAME env var in VAULT_API_ADDR env var #993

raphaelzoellner opened this issue Jan 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@raphaelzoellner
Copy link

Describe the bug
With the current helm chart one cannot use the predefined HOSTNAME environment variable in the predefined VAULT_API_ADDR variable due to the order of the defined environment variables.

To Reproduce
Install the helm chart and set a value for server.ha.apiAddr to https://$(HOSTNAME).my-vault-helm-release-name-internal.my-namespace.svc.cluster.local:8200.
This will render literally, not replacing the HOSTNAME variable reference due to the order of the environment variables defined in the StatefulSet.
https://github.com/regiocom/vault-helm-fork/blob/ad64f921b5985d7862f9c62909f14796e8a199c2/templates/server-statefulset.yaml#L104-L117

Expected behavior
One can use the predefined HOSTNAME variable when setting server.ha.apiAddr. This allows to issue TLS Certificates that are not bound to Pod IPs, but rather to the Pod DNS Entries managed by the StatefulSet which will only change when adding or removing replicas to/from the StatefulSet.
https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id

Environment

  • vault-helm version: 0.27.0

Chart values:

server:
  ha:
    apiAddr: "https://$(HOSTNAME).my-vault-helm-release-name-internal.my-namespace.svc.cluster.local:8200"
@raphaelzoellner raphaelzoellner added the bug Something isn't working label Jan 19, 2024
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

1 participant