Fail rollingupdate if replacement rc schema has same name as existing

This commit is contained in:
Jeff Lowdermlk 2015-01-15 14:33:45 -08:00
parent e6c5d59a55
commit f7b0a92932

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)