Skip to content

Commit

Permalink
Merge pull request #68 from surajssd/missing-port-info
Browse files Browse the repository at this point in the history
Warning on missing port information and no service created
  • Loading branch information
surajssd authored Jul 28, 2016
2 parents 0b2426d + e0bcd32 commit 87270e3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions cli/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -932,10 +932,16 @@ func komposeConvert(komposeObject KomposeObject, opt convertOptions) {
logrus.Fatalf(err.Error())
}

// convert datasvc to json / yaml
datasvc, err := transformer(sc, opt.generateYaml)
if err != nil {
logrus.Fatalf(err.Error())
var datasvc []byte
// If ports not provided in configuration we will not make service
if len(ports) == 0 {
logrus.Warningf("[%s] Service cannot be created because of missing port.", name)
} else {
// convert datasvc to json / yaml
datasvc, err = transformer(sc, opt.generateYaml)
if err != nil {
logrus.Fatalf(err.Error())
}
}

// convert OpenShift DeploymentConfig to json / yaml
Expand Down

0 comments on commit 87270e3

Please sign in to comment.