mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
agent: allow setting auto-auth and vault.namespace separately (#26427)
The new vault.namespace config option seems to always be overridden by the auto-auth namespace, so add an extra check to allow them to be set separately. --------- Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
This commit is contained in:
3
changelog/26427.txt
Normal file
3
changelog/26427.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
```release-note:bug
|
||||||
|
agent: `vault.namespace` no longer gets incorrectly overridden by `auto_auth.namespace`, if set
|
||||||
|
```
|
||||||
@@ -328,6 +328,9 @@ func (c *AgentCommand) Run(args []string) int {
|
|||||||
client.SetNamespace(config.AutoAuth.Method.Namespace)
|
client.SetNamespace(config.AutoAuth.Method.Namespace)
|
||||||
}
|
}
|
||||||
templateNamespace = client.Namespace()
|
templateNamespace = client.Namespace()
|
||||||
|
if !namespaceSetByEnvironmentVariable && config.Vault != nil && config.Vault.Namespace != "" {
|
||||||
|
templateNamespace = config.Vault.Namespace
|
||||||
|
}
|
||||||
|
|
||||||
sinkClient, err := client.CloneWithHeaders()
|
sinkClient, err := client.CloneWithHeaders()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user