mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
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:
commit
deb5c77ce1
@ -749,7 +749,9 @@ func AddDeploymentKeyToReplicationController(oldRc *api.ReplicationController, r
|
|||||||
// we've finished re-adopting existing pods to the rc.
|
// we've finished re-adopting existing pods to the rc.
|
||||||
selector = labels.SelectorFromSet(selectorCopy)
|
selector = labels.SelectorFromSet(selectorCopy)
|
||||||
options = metav1.ListOptions{LabelSelector: selector.String()}
|
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 {
|
for ix := range podList.Items {
|
||||||
pod := &podList.Items[ix]
|
pod := &podList.Items[ix]
|
||||||
if value, found := pod.Labels[deploymentKey]; !found || value != deploymentValue {
|
if value, found := pod.Labels[deploymentKey]; !found || value != deploymentValue {
|
||||||
|
Loading…
Reference in New Issue
Block a user