Skip to content

Commit 56f8843

Browse files
committed
Only ignore non-ready pods is service itself is actually available
1 parent 709072b commit 56f8843

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/waitables.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ func (w *Waitables) getStatusTreeString() string {
178178
branch := namespace_branches[ns]
179179
for n, val := range nsitems {
180180
status := "Unavailable"
181-
if (!w.onlyOnePerServiceRequired && val.IsAvailable()) || (w.onlyOnePerServiceRequired && val.IsAtLeastOneAvailable()) {
181+
svcIsAvailable := (!w.onlyOnePerServiceRequired && val.IsAvailable()) || (w.onlyOnePerServiceRequired && val.IsAtLeastOneAvailable())
182+
if svcIsAvailable {
182183
status = "Available"
183184
}
184185
svc_branch := branch.AddMetaBranch(TreeStatusUnknown, fmt.Sprintf("service/%s: %s", n, status))
@@ -189,7 +190,7 @@ func (w *Waitables) getStatusTreeString() string {
189190
if pod.IsReady() {
190191
status = "Ready"
191192
meta = TreeStatusDone
192-
} else if w.onlyOnePerServiceRequired {
193+
} else if w.onlyOnePerServiceRequired && svcIsAvailable {
193194
status = "Ignored"
194195
meta = TreeStatusIgnored
195196
}

0 commit comments

Comments
 (0)