Skip to content

Commit 72b9e0b

Browse files
resource: Fix resourceLabeler's sharingDisabled to check if a strategy is defined
Signed-off-by: Daniel Kleinstein <daniel@scaleops.com>
1 parent 14c6485 commit 72b9e0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/lm/resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func (rl resourceLabeler) getReplicas() int {
215215
// sharingDisabled checks whether the resourceLabeler has sharing disabled
216216
// TODO: The nil check here is because we call NewGPUResourceLabeler with a nil config when sharing is disabled.
217217
func (rl resourceLabeler) sharingDisabled() bool {
218-
return rl.sharing == nil
218+
return rl.sharing == nil || (rl.sharing.SharingStrategy() == spec.SharingStrategyNone)
219219
}
220220

221221
// isShared checks whether the resource is shared.

0 commit comments

Comments
 (0)