Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion internal/webhook/v1/pod_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/util/strategicpatch"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -331,7 +332,9 @@
container.Resources.Limits = make(corev1.ResourceList)
}
// Limit is set to actual index value (1-512) for Device Plugin to match Pod
// container.Resources.Limits[constants.PodIndexAnnotation] = resource.MustParse(strconv.Itoa(index))
// ResourceFit of dummy device already ignored in TF scheduler
container.Resources.Limits[constants.PodIndexAnnotation] = resource.MustParse(strconv.Itoa(index))

Check failure on line 336 in internal/webhook/v1/pod_webhook.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

undefined: index (typecheck)

Check failure on line 336 in internal/webhook/v1/pod_webhook.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

undefined: index) (typecheck)

Check failure on line 336 in internal/webhook/v1/pod_webhook.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

undefined: index) (typecheck)

Check failure on line 336 in internal/webhook/v1/pod_webhook.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu (1.23.5)

undefined: index

Check failure on line 336 in internal/webhook/v1/pod_webhook.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu (1.34.0)

undefined: index
container.Resources.Requests[constants.PodIndexAnnotation] = resource.MustParse("0")

if !isLocalGPU {
addConnectionForRemoteFixedReplicaVirtualGPU(pod, container, clientConfig)
Expand Down
Loading