Unify per-resource List for unversioned client

This commit is contained in:
Wojciech Tyczynski
2015-10-13 12:11:48 +02:00
parent dfb400e2e9
commit 647aa1bc8c
34 changed files with 73 additions and 67 deletions

View File

@@ -39,7 +39,7 @@ func GetOldRCs(deployment extensions.Deployment, c client.Interface) ([]*api.Rep
// 2. Find the corresponding RCs for pods in podList.
// TODO: Right now we list all RCs and then filter. We should add an API for this.
oldRCs := map[string]api.ReplicationController{}
rcList, err := c.ReplicationControllers(namespace).List(labels.Everything())
rcList, err := c.ReplicationControllers(namespace).List(labels.Everything(), fields.Everything())
if err != nil {
return nil, fmt.Errorf("error listing replication controllers: %v", err)
}
@@ -67,7 +67,7 @@ func GetOldRCs(deployment extensions.Deployment, c client.Interface) ([]*api.Rep
// Returns nil if the new RC doesnt exist yet.
func GetNewRC(deployment extensions.Deployment, c client.Interface) (*api.ReplicationController, error) {
namespace := deployment.ObjectMeta.Namespace
rcList, err := c.ReplicationControllers(namespace).List(labels.Everything())
rcList, err := c.ReplicationControllers(namespace).List(labels.Everything(), fields.Everything())
if err != nil {
return nil, fmt.Errorf("error listing replication controllers: %v", err)
}