Skip to content

Commit

Permalink
Merge pull request kelproject#128 from adambom/patch-4
Browse files Browse the repository at this point in the history
Add ready property to replication controller class
  • Loading branch information
brosner authored Jun 30, 2017
2 parents a93c3ba + 858296a commit 51260e5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pykube/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,13 @@ class ReplicationController(NamespacedAPIObject, ReplicatedMixin, ScalableMixin)
endpoint = "replicationcontrollers"
kind = "ReplicationController"

@property
def ready(self):
return (
self.obj['status']['observedGeneration'] >= self.obj['metadata']['generation'] and
self.obj['status']['readyReplicas'] == self.replicas
)


class ReplicaSet(NamespacedAPIObject, ReplicatedMixin, ScalableMixin):

Expand Down

0 comments on commit 51260e5

Please sign in to comment.