Make listing deployment rcStore namespaced

This commit is contained in:
Janet Kuo
2016-01-25 19:13:17 -08:00
parent 1e68e719c3
commit 14f4f1b065
2 changed files with 21 additions and 2 deletions

View File

@@ -514,7 +514,7 @@ func (dc *DeploymentController) getOldRCs(deployment extensions.Deployment) ([]*
return &podList, err
},
func(namespace string, options api.ListOptions) ([]api.ReplicationController, error) {
return dc.rcStore.List()
return dc.rcStore.ReplicationControllers(namespace).List()
})
}
@@ -523,7 +523,7 @@ func (dc *DeploymentController) getOldRCs(deployment extensions.Deployment) ([]*
func (dc *DeploymentController) getNewRC(deployment extensions.Deployment) (*api.ReplicationController, error) {
existingNewRC, err := deploymentutil.GetNewRCFromList(deployment, dc.client,
func(namespace string, options api.ListOptions) ([]api.ReplicationController, error) {
return dc.rcStore.List()
return dc.rcStore.ReplicationControllers(namespace).List()
})
if err != nil || existingNewRC != nil {
return existingNewRC, err