Set namespace for template server in agent (#10757)
* Set namespace for template server in agent * cl++
This commit is contained in:
parent
fcbbc5f7d8
commit
2602675402
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
agent: Set namespace for template server in agent.
|
||||
```
|
|
@ -371,6 +371,7 @@ func (c *AgentCommand) Run(args []string) int {
|
|||
// Check if a default namespace has been set
|
||||
mountPath := config.AutoAuth.Method.MountPath
|
||||
if cns := config.AutoAuth.Method.Namespace; cns != "" {
|
||||
namespace = cns
|
||||
// Only set this value if the env var is empty, otherwise we end up with a nested namespace
|
||||
if ens := os.Getenv(api.EnvVaultNamespace); ens == "" {
|
||||
mountPath = path.Join(cns, mountPath)
|
||||
|
|
Loading…
Reference in New Issue