Merge pull request #49843 from alrs/kubectl-rolling_updater-swallowed-error

Automatic merge from submit-queue (batch tested with PRs 48487, 49009, 49862, 49843, 49700)

fix swallowed error in kubectl rolling_updater

This fixes a swallowed error in kubectl. 

AddDeploymentKeyToReplicationController() is already tested, but there was an error that was not being exposed.

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-08-04 23:40:07 -07:00 committed by GitHub
commit deb5c77ce1

View File

@ -749,7 +749,9 @@ func AddDeploymentKeyToReplicationController(oldRc *api.ReplicationController, r
// we've finished re-adopting existing pods to the rc.
selector = labels.SelectorFromSet(selectorCopy)
options = metav1.ListOptions{LabelSelector: selector.String()}
podList, err = podClient.Pods(namespace).List(options)
if podList, err = podClient.Pods(namespace).List(options); err != nil {
return nil, err
}
for ix := range podList.Items {
pod := &podList.Items[ix]
if value, found := pod.Labels[deploymentKey]; !found || value != deploymentValue {