Skip to content

Commit f43ad34

Browse files
committed
[Bug] Fix #296
1 parent c872179 commit f43ad34

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/lint/svc.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ func (s *Service) checkEndpoints(ctx context.Context, fqn string, kind v1.Servic
115115
s.AddCode(ctx, 1110)
116116
return
117117
}
118-
if len(ep.Subsets) == 1 {
118+
var eps int
119+
for _, s := range ep.Subsets {
120+
eps += len(s.Addresses)
121+
}
122+
if eps == 1 {
119123
s.AddCode(ctx, 1109)
120124
}
121125
}

0 commit comments

Comments
 (0)