Skip to content

Commit

Permalink
Merge pull request #58 from jakereps/issue-57-namespace-svc-check
Browse files Browse the repository at this point in the history
Add warning for namespaces that have no services
  • Loading branch information
cjimti authored Apr 26, 2019
2 parents d318c1d + 3867b7d commit 6fc5246
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/kubefwd/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ func fwdServices(opts FwdServiceOpts) error {
if err != nil {
return err
}
if len(services.Items) < 1 {
log.Printf("WARNING: No services found for namespace %s.\n", opts.Namespace)
return nil
}

publisher := &fwdpub.Publisher{
PublisherName: "Services",
Expand Down

0 comments on commit 6fc5246

Please sign in to comment.