Skip to content

Commit

Permalink
Merge pull request #806 from revit13/v2_fix
Browse files Browse the repository at this point in the history
Fix set_s3_env_vars_to_component in kfp v2.
  • Loading branch information
roytman authored Nov 17, 2024
2 parents c427695 + ea6de8e commit 7e505c6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def _add_node_selector() -> None:
def set_s3_env_vars_to_component(
task: dsl.PipelineTask,
secret: str = "",
env2key: Dict[str, str] = {"s3-key": "S3_KEY", "s3-secret": "S3_SECRET", "s3-endpoint": "ENDPOINT"},
env2key: Dict[str, str] = None,
prefix: str = None,
) -> None:
"""
Expand All @@ -113,6 +113,8 @@ def set_s3_env_vars_to_component(
:param env2key: dict with mapping each env variable to a key in the secret
:param prefix: prefix to add to env name
"""
if env2key is None:
env2key = {"s3-key": "S3_KEY", "s3-secret": "S3_SECRET", "s3-endpoint": "ENDPOINT"}

if prefix is not None:
for secret_key, _ in env2key.items():
Expand Down

0 comments on commit 7e505c6

Please sign in to comment.