Fixes kompose.service.type label issue

Minor Fix, resolves #673
This commit is contained in:
Suraj Narwade 2017-06-27 09:52:11 +05:30
parent 1cc7e2c7f9
commit 9bd3488512

View File

@ -272,7 +272,7 @@ func libComposeToKomposeMapping(composeObject *project.Project) (kobject.Kompose
}
func checkLabelsPorts(noOfPort int, labels string, svcName string) error {
if noOfPort == 0 && labels == "NodePort" || labels == "LoadBalancer" {
if noOfPort == 0 && (labels == "NodePort" || labels == "LoadBalancer") {
return errors.Errorf("%s defined in service %s with no ports present. Issues may occur when bringing up artifacts.", labels, svcName)
}
return nil