diff --git a/changelog/10757.txt b/changelog/10757.txt new file mode 100644 index 000000000..23fec64a8 --- /dev/null +++ b/changelog/10757.txt @@ -0,0 +1,3 @@ +```release-note:bug +agent: Set namespace for template server in agent. +``` \ No newline at end of file diff --git a/command/agent.go b/command/agent.go index 0bbad294b..3ee5bafe0 100644 --- a/command/agent.go +++ b/command/agent.go @@ -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)