@@ -92,6 +92,12 @@ def load_override_config(override_file_path: str | None = None) -> ClusterConfig
9292 ) from e
9393
9494
95+
96+ def convert_env_vars_dict_to_list (env_vars : dict [str , str ]) -> list [dict [str , str ]]:
97+ """Convert a dictionary of environment variables to a list of dictionaries"""
98+ return [{"name" : key , "value" : value } for key , value in env_vars .items ()]
99+
100+
95101def merge_deployment_configs (
96102 manifest : AgentManifest ,
97103 cluster_config : ClusterConfig | None ,
@@ -213,6 +219,21 @@ def merge_deployment_configs(
213219 if cluster_config .additional_overrides :
214220 _deep_merge (helm_values , cluster_config .additional_overrides )
215221
222+ # Convert the env vars to a list of dictionaries
223+ if "env" in helm_values :
224+ helm_values ["env" ] = convert_env_vars_dict_to_list (helm_values ["env" ])
225+ if TEMPORAL_WORKER_KEY in helm_values and "env" in helm_values [TEMPORAL_WORKER_KEY ]:
226+ helm_values [TEMPORAL_WORKER_KEY ]["env" ] = convert_env_vars_dict_to_list (
227+ helm_values [TEMPORAL_WORKER_KEY ]["env" ]
228+ )
229+
230+ print ("Deploying with the following helm values: " , helm_values )alues ["env" ] = convert_env_vars_dict_to_list (helm_values ["env" ])
231+ if TEMPORAL_WORKER_KEY in helm_values :
232+ helm_values [TEMPORAL_WORKER_KEY ]["env" ] = convert_env_vars_dict_to_list (
233+ helm_values [TEMPORAL_WORKER_KEY ]["env" ]
234+ )
235+
236+ print ("Deploying with the following helm values: " , helm_values )
216237 return helm_values
217238
218239
0 commit comments