Make readiness-check work when updatedReplicas is None 57/96557/1
authorAkansha Dua <akansha.dua@amdocs.com>
Thu, 3 Oct 2019 11:45:21 +0000 (17:15 +0530)
committerAkansha Dua <akansha.dua@amdocs.com>
Thu, 3 Oct 2019 11:52:18 +0000 (17:22 +0530)
Issue-ID: OOM-2057

Signed-off-by: Akansha Dua <akansha.dua@amdocs.com>
Change-Id: I8deb64ee5c5e9667f63a61a7204a83b095a2fc34

kubernetes/readiness/docker/init/ready.py

index db7105a..3f76d10 100644 (file)
@@ -79,7 +79,7 @@ def wait_for_deployment_complete(deployment_name):
         response = api.read_namespaced_deployment(deployment_name, namespace)
         s = response.status
         if (s.unavailable_replicas is None and
-                s.updated_replicas == response.spec.replicas and
+                ( s.updated_replicas is None or s.updated_replicas == response.spec.replicas ) and
                 s.replicas == response.spec.replicas and
                 s.ready_replicas == response.spec.replicas and
                 s.observed_generation == response.metadata.generation):