Unify per-resource List for unversioned client
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user