Skip to content

Commit

Permalink
Earlier return
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejoh committed Jan 11, 2025
1 parent d5c7f23 commit a70d5d0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/f5_virtualserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,10 @@ func (vs *f5VirtualServerSource) filterByAnnotations(virtualServers []*f5.Virtua
}

func isVirtualServerReady(vs *f5.VirtualServer) bool {
normalizedStatus := strings.ToLower(vs.Status.Status)
normalizedAddress := strings.ToLower(vs.Status.VSAddress)
if strings.ToLower(vs.Status.Status) != "ok" {
return false
}

return normalizedStatus == "ok" && (normalizedAddress != "none" && normalizedAddress != "")
normalizedAddress := strings.ToLower(vs.Status.VSAddress)
return normalizedAddress != "none" && normalizedAddress != ""
}

0 comments on commit a70d5d0

Please sign in to comment.