From 2a4d3fb35781bf4914b4d998e102d4bf881e5d07 Mon Sep 17 00:00:00 2001 From: ofirelarat <96ofir11@gmail.com> Date: Mon, 24 Jul 2023 20:25:11 +0300 Subject: [PATCH] fix k8s enviroments --- runner/pipeline_runner/kubernetes_runner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runner/pipeline_runner/kubernetes_runner.py b/runner/pipeline_runner/kubernetes_runner.py index d6edb02..530661b 100644 --- a/runner/pipeline_runner/kubernetes_runner.py +++ b/runner/pipeline_runner/kubernetes_runner.py @@ -48,12 +48,16 @@ def __init__(self, kubernetes_runner_config: PipelineKubernetesRunner): def rollout(self, pipeline_configuration: PipelineConfig, connector: ConnectorConfig): # create a container with environment variables + + envs_dict = pipeline_configuration.as_dict() + envs_dict.update(connector.as_dict()) + container = client.V1Container( name="my-container", image="my-image:latest", image_pull_policy="Never", env=[ - client.V1EnvVar(name="MY_ENV_VAR", value="my value"), + client.V1EnvVar(name=env_key, value=env_value) for env_key, env_value in envs_dict.items() ] )