Upate env vars
+import json
+
from kubernetes import client
@@ -7,18 +9,12 @@ def get_from_experiment_config_map(name, key_name):
return client.V1EnvVar(name=key_name, value_from=value_from)
-def get_from_secret(name, key_name):
- secret_key_ref = client.V1SecretKeySelector(name=name, key=key_name)
+def get_from_secret(secret_name, secret_key_name, key_name):
+ secret_key_ref = client.V1SecretKeySelector(name=secret_name, key=secret_key_name)
value_from = client.V1EnvVarSource(secret_key_ref=secret_key_ref)
return client.V1EnvVar(name=key_name, value_from=value_from)
-def get_from_secret(key_name, key):
- secret_key_ref = client.V1SecretKeySelector(name=secret_ref_name, key=key)
- value = client.V1EnvVarSource(secret_key_ref=secret_key_ref)
- return client.V1EnvVar(name=key_name, value_from=value)
-
-
def get_env_var(name, value, reraise=True):
if not isinstance(value, str):
try:
