Commit 10117cc8 authored by Ashley Reese's avatar Ashley Reese

Validate unique host ports with host IPs as well

parent 2b7899ae
......@@ -1546,7 +1546,7 @@ func AccumulateUniqueHostPorts(containers []api.Container, accumulator *sets.Str
if port == 0 {
continue
}
str := fmt.Sprintf("%d/%s", port, ctr.Ports[pi].Protocol)
str := fmt.Sprintf("%s/%s/%d", ctr.Ports[pi].Protocol, ctr.Ports[pi].HostIP, port)
if accumulator.Has(str) {
allErrs = append(allErrs, field.Duplicate(idxPath.Child("hostPort"), str))
} else {
......
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