Skip to content

Commit

Permalink
make waiting time configurable (kubeflow#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
lluunn authored and k8s-ci-robot committed Mar 19, 2018
1 parent ce2898e commit 0ed1510
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions py/kubeflow/testing/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,14 @@ def configure_kubectl(project, zone, cluster_name):
run(["gcloud", "--project=" + project, "container",
"clusters", "--zone=" + zone, "get-credentials", cluster_name])

def wait_for_deployment(api_client, namespace, name):
def wait_for_deployment(api_client, namespace, name, timeout_minutes=2):
"""Wait for deployment to be ready.
Args:
api_client: K8s api client to use.
namespace: The name space for the deployment.
name: The name of the deployment.
timeout_minutes: Timeout interval in minutes.
Returns:
deploy: The deploy object describing the deployment.
Expand All @@ -258,7 +259,7 @@ def wait_for_deployment(api_client, namespace, name):
TimeoutError: If timeout waiting for deployment to be ready.
"""
# Wait for tiller to be ready
end_time = datetime.datetime.now() + datetime.timedelta(minutes=2)
end_time = datetime.datetime.now() + datetime.timedelta(minutes=timeout_minutes)

ext_client = k8s_client.ExtensionsV1beta1Api(api_client)

Expand Down

0 comments on commit 0ed1510

Please sign in to comment.