Fixing bug where it would wait for replicas that are not there.
@@ -51,6 +51,7 @@ class K8sReplicationController(K8sObject):
# _hash = base64.b64encode(self.as_json())
# self.add_annotation('kubernetes.io/deployment', _hash)
super(K8sReplicationController, self).create()
+ if self.desired_replicas > 0:
self._wait_for_desired_replicas()
return self
@@ -58,6 +59,7 @@ class K8sReplicationController(K8sObject):
# _hash = base64.b64encode(self.as_json())
# self.add_annotation('kubernetes.io/deployment', _hash)
super(K8sReplicationController, self).update()
+ if self.desired_replicas > 0:
self._wait_for_desired_replicas()
return self
