fix swallowed error in kubectl rolling_updater

This commit is contained in:
Lars Lehtonen 2017-07-29 16:45:34 -07:00
parent 02b520f0a4
commit aa76cc8d7b
No known key found for this signature in database
GPG Key ID: 8137D474EBCB04F2

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 {