Commit eb14ba93 authored by Dawn Chen's avatar Dawn Chen

Merge pull request #2390 from ddysher/random-fix

Use Service.Name for validation error.
parents 8a508bcc 29a56c4f
......@@ -432,7 +432,7 @@ func ValidateService(service *api.Service, lister ServiceLister, ctx api.Context
} else {
for i := range services.Items {
if services.Items[i].Spec.CreateExternalLoadBalancer && services.Items[i].Spec.Port == service.Spec.Port {
allErrs = append(allErrs, errs.NewConflict("service", service.Namespace, fmt.Errorf("Port: %d is already in use", service.Spec.Port)))
allErrs = append(allErrs, errs.NewConflict("service", service.Name, fmt.Errorf("Port: %d is already in use", service.Spec.Port)))
break
}
}
......
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