Introduction
HashiCorp's Helm chart can be used to deploy Terraform Enterprise FDO on Kubernetes .
The default helm chart behaviour is to spawn the TFE agents in a different namespace than the TFE application.
Problem
Users asking for a way to spawn the TFE agents in the same namespace as the TFE application.
Things to consider before using the solution
Terraform agents (TFE agents) are deliberately placed in a separate namespace as the Terraform Enterprise application. This is because Terraform Enterprise is given a set of permissions required to run and monitor the Kubernetes jobs created.
The agents are deliberately placed in a separate namespace to isolate the danger those permissions provide.
Solution
Version v1.3.4 or later of the Terraform Enterprise Helm chart must be used as this is the release where the agents namespace is configurable.
To change the TFE agents' namespace one may set agents.namespace.name
in the Helm chart values to the desired namespace and agents.namespace.enabled
to false
if the namespace already exists, so it's not created twice.