Skip to content

Commit

Permalink
fix wait_for_deployment to also check for apps/v1 deployments (kubefl…
Browse files Browse the repository at this point in the history
…ow#477)

Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
  • Loading branch information
Yannis Zarkadas authored and k8s-ci-robot committed Oct 7, 2019
1 parent e1f4fa2 commit f1d5dcd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion py/kubeflow/testing/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,13 @@ def wait_for_deployment(api_client,
minutes=timeout_minutes)

ext_client = k8s_client.ExtensionsV1beta1Api(api_client)
ext_client_apps = k8s_client.AppsV1beta1Api(api_client)

while datetime.datetime.now() < end_time:
deploy = ext_client.read_namespaced_deployment(name, namespace)
try:
deploy = ext_client.read_namespaced_deployment(name, namespace)
except rest.ApiException:
deploy = ext_client_apps.read_namespaced_deployment(name, namespace)
# ready_replicas could be None
if (deploy.status.ready_replicas and
deploy.status.ready_replicas >= replicas):
Expand Down

0 comments on commit f1d5dcd

Please sign in to comment.