Merge pull request #2390 from ddysher/random-fix

Use Service.Name for validation error.
pull/6/head
Dawn Chen 2014-11-14 17:27:47 -08:00
commit eb14ba9396
1 changed files with 1 additions and 1 deletions

View File

@ -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
}
}