Commit 39b6b005 authored by bgrant0607's avatar bgrant0607

Merge pull request #3540 from jlowdermilk/rollingupdate

Fail rollingupdate if replacement rc schema has same name as existing
parents cbfc4688 f7b0a929
...@@ -66,6 +66,10 @@ $ cat frontend-v2.json | kubectl rollingupdate frontend-v1 -f - ...@@ -66,6 +66,10 @@ $ cat frontend-v2.json | kubectl rollingupdate frontend-v1 -f -
if mapping.Kind != "ReplicationController" { if mapping.Kind != "ReplicationController" {
usageError(cmd, "%s does not specify a valid ReplicationController", filename) 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) err = CompareNamespaceFromFile(cmd, namespace)
checkErr(err) checkErr(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment