Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the image check when rolling update should consider image tag latest as well #23516

Merged
merged 1 commit into from Mar 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/kubectl/cmd/rollingupdate.go
Expand Up @@ -21,6 +21,7 @@ import (
"fmt"
"io"
"os"
"strings"
"time"

"github.com/golang/glog"
Expand Down Expand Up @@ -246,7 +247,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)
} else {
if oldRc.Spec.Template.Spec.Containers[0].Image == image {
if oldRc.Spec.Template.Spec.Containers[0].Image == image && !strings.HasSuffix(image, ":latest") {
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)
Expand Down