Skip to content

Commit

Permalink
Skip adding service if it has no items
Browse files Browse the repository at this point in the history
  • Loading branch information
abelfodil committed Dec 25, 2024
1 parent 6b97639 commit 36425f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ func fetchHomerConfig(clientset *kubernetes.Clientset) (HomerConfig, error) {

var services []HomerService
for _, service := range serviceMap {
if len(service.Items) == 0 {
fmt.Printf("Skipping empty service: %s\n", service.Name)
continue
}
sortHomerItems(service.Items)
services = append(services, *service)
}
Expand Down

0 comments on commit 36425f5

Please sign in to comment.