Merge pull request #674 from surajnarwade/minor_fix

Fixes kompose.service.type label issue
This commit is contained in:
Charlie Drage 2017-06-28 08:42:31 -04:00 committed by GitHub
commit 2c0441da78

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