Merge pull request #23516 from zhouhaibing089/imagecheck_fix

Auto commit by PR queue bot
pull/6/head
k8s-merge-robot 2016-03-26 23:15:58 -07:00
commit 9a5b4658cb
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import (
"fmt" "fmt"
"io" "io"
"os" "os"
"strings"
"time" "time"
"github.com/golang/glog" "github.com/golang/glog"
@ -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) fmt.Fprintf(out, "Found existing update in progress (%s), resuming.\n", newRc.Name)
} else { } 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") 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)