diff --git a/metaflow/plugins/argo/argo_workflows.py b/metaflow/plugins/argo/argo_workflows.py index b033c6d638f..d54963bb154 100644 --- a/metaflow/plugins/argo/argo_workflows.py +++ b/metaflow/plugins/argo/argo_workflows.py @@ -3147,6 +3147,13 @@ def _container(cmds): + ARGO_WORKFLOWS_KUBERNETES_SECRETS.split(",") if k ], + security_context=( + kubernetes_sdk.V1SecurityContext( + **resources["security_context"] + ) + if resources.get("security_context") + else None + ), resources=kubernetes_sdk.V1ResourceRequirements( requests={ "cpu": str(kube_defaults["cpu"]), @@ -3305,6 +3312,13 @@ def _error_msg_capture_hook_templates(self): + ARGO_WORKFLOWS_KUBERNETES_SECRETS.split(",") if k ], + security_context=( + kubernetes_sdk.V1SecurityContext( + **resources["security_context"] + ) + if resources.get("security_context") + else None + ), resources=kubernetes_sdk.V1ResourceRequirements( # NOTE: base resources for this are kept to a minimum to save on running costs. # This has an adverse effect on startup time for the daemon, which can be completely @@ -3796,6 +3810,13 @@ def _heartbeat_daemon_template(self): + ARGO_WORKFLOWS_KUBERNETES_SECRETS.split(",") if k ], + security_context=( + kubernetes_sdk.V1SecurityContext( + **resources["security_context"] + ) + if resources.get("security_context") + else None + ), resources=kubernetes_sdk.V1ResourceRequirements( # NOTE: base resources for this are kept to a minimum to save on running costs. # This has an adverse effect on startup time for the daemon, which can be completely