Remaining refactor for PodTemplateSpec and fixing test cases

This commit is contained in:
Clayton Coleman
2014-11-06 21:09:46 -05:00
parent 72bf12c86d
commit 94c873e7a4
18 changed files with 285 additions and 201 deletions

View File

@@ -26,10 +26,10 @@ import (
// for a controller's ReplicaSelector equals the Replicas count.
func (c *Client) ControllerHasDesiredReplicas(controller api.ReplicationController) wait.ConditionFunc {
return func() (bool, error) {
pods, err := c.Pods(controller.Namespace).List(labels.Set(controller.DesiredState.ReplicaSelector).AsSelector())
pods, err := c.Pods(controller.Namespace).List(labels.Set(controller.Spec.Selector).AsSelector())
if err != nil {
return false, err
}
return len(pods.Items) == controller.DesiredState.Replicas, nil
return len(pods.Items) == controller.Spec.Replicas, nil
}
}