Merge pull request #4696 from kazegusuri/rollingupdate-namespace-aware

use default namespace to do rollingupdate
pull/6/head
Rohit Jnagal 2015-02-23 10:15:03 -08:00
commit 33855c2286
1 changed files with 2 additions and 5 deletions

View File

@ -91,13 +91,10 @@ func (f *Factory) NewCmdRollingUpdate(out io.Writer) *cobra.Command {
checkErr(err)
newRc := obj.(*api.ReplicationController)
if len(namespace) == 0 {
namespace = api.NamespaceDefault
}
updater := kubectl.NewRollingUpdater(namespace, client)
updater := kubectl.NewRollingUpdater(cmdNamespace, client)
// fetch rc
oldRc, err := client.ReplicationControllers(namespace).Get(oldName)
oldRc, err := client.ReplicationControllers(cmdNamespace).Get(oldName)
checkErr(err)
var hasLabel bool