Skip to content

Commit

Permalink
Merge pull request kubernetes#21445 from janetkuo/fix-rolling-update-nil
Browse files Browse the repository at this point in the history
Fix rolling-update --image nil pointer dereference
  • Loading branch information
bgrant0607 committed Feb 24, 2016
2 parents 9403f95 + e735667 commit 4add4eb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/kubectl/cmd/rollingupdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/apimachinery/registered"
"k8s.io/kubernetes/pkg/kubectl"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/resource"
Expand Down Expand Up @@ -235,7 +234,7 @@ func RunRollingUpdate(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, arg
// than the old rc. This selector is the hash of the rc, which will differ because the new rc has a
// different image.
if len(image) != 0 {
codec := registered.GroupOrDie(client.APIVersion().Group).Codec
codec := api.Codecs.LegacyCodec(client.APIVersion())
keepOldName = len(args) == 1
newName := findNewName(args, oldRc)
if newRc, err = kubectl.LoadExistingNextReplicationController(client, cmdNamespace, newName); err != nil {
Expand Down

0 comments on commit 4add4eb

Please sign in to comment.