diff --git a/controllers/tf_controller_runner.go b/controllers/tf_controller_runner.go index 4e17181b..0b8aff69 100644 --- a/controllers/tf_controller_runner.go +++ b/controllers/tf_controller_runner.go @@ -210,21 +210,16 @@ func (r *TerraformReconciler) runnerPodSpec(terraform infrav1.Terraform, tlsSecr } } } - // if terraform.GetLabels() != nil { - // for k, v := range terraform.GetLabels() { - // if strings.HasPrefix(k, "tracing.attributes/") { - - // } - // } - - // } - //adding traceparent env to runner - // if envValue := os.Getenv("TRACEPARENT"); envValue != "" { - // envvarsMap["TRACEPARENT"] = v1.EnvVar{ - // Name: "TRACEPARENT", - // Value: envValue, - // } - // } + if terraform.GetLabels() != nil { + for k, v := range terraform.GetLabels() { + if strings.Compare(k, "tracing.attributes/team") == 0 { + envvarsMap["TEAM"] = v1.EnvVar{ + Name: "TEAM", + Value: v, + } + } + } + } for _, env := range terraform.Spec.RunnerPodTemplate.Spec.Env { envvarsMap[env.Name] = env