Skip to content

Commit

Permalink
Add warning for namespaces that have no services
Browse files Browse the repository at this point in the history
  • Loading branch information
jakereps committed Apr 26, 2019
1 parent d318c1d commit 3867b7d
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 3867b7d

Please sign in to comment.