mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #23853 from janetkuo/revert-rollingupdate-latest
Revert "rolling update will check whether the image is distinct or not, however the image with tag latest should be excluded"
This commit is contained in:
commit
f41f5dc823
@ -21,7 +21,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
@ -249,7 +248,7 @@ func RunRollingUpdate(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, arg
|
|||||||
}
|
}
|
||||||
fmt.Fprintf(out, "Found existing update in progress (%s), resuming.\n", newRc.Name)
|
fmt.Fprintf(out, "Found existing update in progress (%s), resuming.\n", newRc.Name)
|
||||||
} else {
|
} else {
|
||||||
if oldRc.Spec.Template.Spec.Containers[0].Image == image && !strings.HasSuffix(image, ":latest") {
|
if oldRc.Spec.Template.Spec.Containers[0].Image == image {
|
||||||
return cmdutil.UsageError(cmd, "Specified --image must be distinct from existing container image")
|
return cmdutil.UsageError(cmd, "Specified --image must be distinct from existing container image")
|
||||||
}
|
}
|
||||||
newRc, err = kubectl.CreateNewControllerFromCurrentController(client, codec, cmdNamespace, oldName, newName, image, container, deploymentKey)
|
newRc, err = kubectl.CreateNewControllerFromCurrentController(client, codec, cmdNamespace, oldName, newName, image, container, deploymentKey)
|
||||||
|
Loading…
Reference in New Issue
Block a user