Skip to content

Commit 6623f03

Browse files
Ko, Kai 黄 凱NekoHK
authored andcommitted
fix: correct missing handling for ResourceSlice with zero devices
Signed-off-by: kokai <ko.kai@jp.fujitsu.com>
1 parent 0a352eb commit 6623f03

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/utils/info_utils.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,15 @@ func GetResourceSliceInfo(ctx context.Context, kubeClient client.Client) ([]type
145145
}
146146

147147
for _, rs := range resourceSliceList.Items {
148+
if len(rs.Spec.Devices) == 0 {
149+
continue
150+
}
148151
if hasBindingConditions(rs) {
149152
continue
150153
}
154+
if rs.Spec.NodeName == nil {
155+
continue
156+
}
151157

152158
var resourceSliceInfo types.ResourceSliceInfo
153159

0 commit comments

Comments
 (0)