From 82c7d8933e0d31627a2e5b0beba2e1341883fb1b Mon Sep 17 00:00:00 2001 From: waTeim Date: Mon, 9 Oct 2023 14:08:03 -0400 Subject: [PATCH] Add is_ready to app status --- tycho/__init__.py | 2 +- tycho/kube.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tycho/__init__.py b/tycho/__init__.py index 57d0a1b..781742d 100644 --- a/tycho/__init__.py +++ b/tycho/__init__.py @@ -1 +1 @@ -VERSION = "1.15.0" +VERSION = "1.16.0" diff --git a/tycho/kube.py b/tycho/kube.py index 3a6791b..7af6165 100644 --- a/tycho/kube.py +++ b/tycho/kube.py @@ -426,6 +426,10 @@ def status (self, name=None, username=None, namespace="default"): ip_address = "127.0.0.1" port = 80 + desired_replicas = item.status.replicas + ready_replicas = item.status.ready_replicas + is_ready = ready_replicas == desired_replicas + result.append( { "name": item.metadata.name, @@ -436,7 +440,8 @@ def status (self, name=None, username=None, namespace="default"): "creation_time": time, "username": item_username, "utilization": pod_resources, - "workspace_name": workspace_name + "workspace_name": workspace_name, + "is_ready": is_ready } )