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.
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
Describe the bug With the current helm chart one cannot use the predefined
HOSTNAME
environment variable in the predefinedVAULT_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
tohttps://$(HOSTNAME).my-vault-helm-release-name-internal.my-namespace.svc.cluster.local:8200
. This will render literally, not replacing theHOSTNAME
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-L117Expected behavior One can use the predefined
HOSTNAME
variable when settingserver.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-idEnvironment
Chart values: