Replies: 1 comment
-
I've achieved my goal without the use of a while loop but with the following component @dsl.container_component
def kubectl_wait(
resource_type: str,
resource_name: str,
namespace: str,
condition: str,
timeout: str = "-1s",
):
return dsl.ContainerSpec(
image='bitnami/kubectl:1.29.5',
command=["kubectl", "wait"],
args=[
f"{resource_type}/{resource_name}",
f"--namespace={namespace}",
f"--for={condition}",
f"--timeout={timeout}"
]
) and the condition jsonpath={.status.conditions[?(@.type==\'Ready\')].reason}=PodCompleted |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My case:
I would like to build a pipeline part of which depends on the Kubeflow's SparkOperator.
I've created 2 pipeline components which can apply and get the SparkApplication from the K8S server.
The issue:
When I try to get the status of the spark job, I need to find a way to periodically check and wait for the job status to be completed.
I've search the documentation and pipeline's control flows don't match my case.
I've seen in this page that in v1 this behavior could be achieved using graph_component.
Since it got deprecated how can I perform something similar in v2, I can't find any information on the documentation?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions