Commit deb5c77c authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents eeb72d78 aa76cc8d
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment