1

I am currently having issues updating the Vault server HA (high-availability) storage to use PostgreSQL upon Vault installation via Helm 3.

Things I have tried:

  1. Setting the values needed for HA (high-availability) manually, using the --set= Helm flag, by running the following command:
helm install vault hashicorp/vault \
    --set='server.ha.enabled=true' \
    --set='server.ha.replicas=4' \
    --set='server.ha.raft.config= |
        ui = true
        listener "tcp" {
          address = "[::]:8200"
          cluster_address = "[::]:8201"
        }

        storage "postgresql" {
          connection_url = "postgres://<pg_user>:<pg_pw>@<pg_host>:5432/<pg_db>"
        }

        service_registration "kubernetes" {}'

This would be great if it worked, but the storageconfig.hcl was not updated on installation.

  1. I have tried creating a Helm override config file, and replaced the storage section from raft to postgresql. As mentioned here: Vault on Kubernetes Deployment Guide | Vault - HashiCorp Learn

  2. Tried editing the storageconfig.hcl running directly in the pod. I can delete the file, but I can not use vim to edit/replace with a config on my machine – plus, I think this is bad practice since it is not linked with the Helm installation.

Looking for general information about what I might be doing wrong, or maybe some other ideas of what I could try to get this working as intended.

  • in the storage, you have to place `ha_enabled` and `table`, read more about this parameters [here](https://www.vaultproject.io/docs/configuration/storage/postgresql#postgresql-parameters), – Saikat Chakrabortty May 08 '21 at 01:39

0 Answers0