Merge pull request #3540 from jlowdermilk/rollingupdate

Fail rollingupdate if replacement rc schema has same name as existing
This commit is contained in:
bgrant0607 2015-01-15 16:58:36 -08:00
commit 39b6b00558

View File

@ -66,6 +66,10 @@ $ cat frontend-v2.json | kubectl rollingupdate frontend-v1 -f -
if mapping.Kind != "ReplicationController" {
usageError(cmd, "%s does not specify a valid ReplicationController", filename)
}
if oldName == newName {
usageError(cmd, "%s cannot have the same name as the existing ReplicationController %s",
filename, oldName)
}
err = CompareNamespaceFromFile(cmd, namespace)
checkErr(err)