Skip to content

Commit c4e03be

Browse files
Make vault support namespaces
1 parent a1c235b commit c4e03be

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

docs/ddayconfig.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ backends:
5454
# be logged to stdout. You probably only want this if you're debugging.
5555
#trace: true
5656

57+
# (string) An optional Vault enterprise namespace to use for all Vault
58+
# requests.
59+
#namespace: "my-namespace"
60+
5761
# (hash) Options for authorizing to Vault
5862
# Must either provide "token" for Token auth or "role_id" and "secret_id" for AppRole
5963
# If a token is given, it should either have no expiry or be renewable.

storage/vault.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ type VaultConfig struct {
3434
Address string `yaml:"address"`
3535
InsecureSkipVerify bool `yaml:"insecure_skip_verify"`
3636
CACerts string `yaml:"ca_certs"`
37+
Namespace string `yaml:"namespace"`
3738
BasePath string `yaml:"base_path"`
3839
Trace bool `yaml:"trace"`
3940
Auth struct {
@@ -97,7 +98,8 @@ func newVaultAccessor(conf VaultConfig) (*VaultAccessor, vaultAuthMetadata, erro
9798
MaxIdleConnsPerHost: runtime.NumCPU(),
9899
},
99100
},
100-
Trace: tracer,
101+
Namespace: conf.Namespace,
102+
Trace: tracer,
101103
}
102104

103105
authType := vaultAuthToken

0 commit comments

Comments
 (0)