hashicorp / terraform-enterprise-helm

The official repo for Terraform Enterprise helm charts
Mozilla Public License 2.0
16 stars 17 forks source link

Let `agentWorkerPodTemplate` be in YAML #66

Closed USA-RedDragon closed 6 months ago

USA-RedDragon commented 6 months ago

Kubernetes users are typically going to be more comfortable with a YAML format for pod specs, so this change modifies the usage of the agentWorkerPodTemplate to convert the YAML to JSON (before it finally gets expanded to base64 for the environment variable) using Helm's mustToJSON function. Because the value is taken to JSON whitespace is minified by the JSON converter and the final base64 encoding of the environment variable preserves any whitespace.

This can be tested and validated with helm template tfe . | grep TFE_RUN_PIPELINE_KUBERNETES_POD_TEMPLATE | awk '{print $2}' | base64 -d with the values.yaml's agentWorkerPodTemplate modified .

This PR also links to the pod spec docs in the values.yaml comment as well as the documentation.