ref:
When filtering out sidecar containers leaves exactly one candidate (the expected success case), the function raises "No container names left" instead of returning the candidate. When candidates is empty, it falls through to candidates[0] which raises an IndexError.
Expected: if len(candidates) == 0 so that one remaining candidate is returned successfully.
ref:
kale/kale/common/podutils.py
Line 123 in 95e97ac
When filtering out sidecar containers leaves exactly one candidate (the expected success case), the function raises
"No container names left"instead of returning the candidate. When candidates is empty, it falls through tocandidates[0]which raises an IndexError.Expected: if len(candidates) == 0 so that one remaining candidate is returned successfully.