From 26026754029c15da4ba367cdb3d1c2a7b8788e9b Mon Sep 17 00:00:00 2001 From: Vishal Nayak Date: Mon, 25 Jan 2021 17:37:01 -0500 Subject: [PATCH] Set namespace for template server in agent (#10757) * Set namespace for template server in agent * cl++ --- changelog/10757.txt | 3 +++ command/agent.go | 1 + 2 files changed, 4 insertions(+) create mode 100644 changelog/10757.txt 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)