Skip to content

Commit 1780358

Browse files
committed
Instantiate ResourceClaimer in app
1 parent 15ee866 commit 1780358

File tree

1 file changed

+9
-0
lines changed
  • cmd/libvirt-provider/app

1 file changed

+9
-0
lines changed

cmd/libvirt-provider/app/app.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import (
1616
"sync"
1717
"time"
1818

19+
claim "command-line-arguments/Users/D054209/.asdf/installs/golang/1.24.11/packages/pkg/mod/github.com/ironcore-dev/provider-utils@v0.0.0-20260122114036-2b9ff73d147e/claimutils/claim/manager.go"
20+
1921
"github.com/go-logr/logr"
2022
"github.com/ironcore-dev/ironcore-image/oci/remote"
2123
ocistore "github.com/ironcore-dev/ironcore-image/oci/store"
@@ -37,6 +39,8 @@ import (
3739
"github.com/ironcore-dev/libvirt-provider/internal/raw"
3840
"github.com/ironcore-dev/libvirt-provider/internal/server"
3941
"github.com/ironcore-dev/libvirt-provider/internal/strategy"
42+
"github.com/ironcore-dev/provider-utils/claimutils/gpu"
43+
"github.com/ironcore-dev/provider-utils/claimutils/pci"
4044
"github.com/ironcore-dev/provider-utils/eventutils/event"
4145
"github.com/ironcore-dev/provider-utils/eventutils/recorder"
4246
ocihostutils "github.com/ironcore-dev/provider-utils/ociutils/host"
@@ -348,6 +352,10 @@ func Run(ctx context.Context, opts Options) error {
348352
return err
349353
}
350354

355+
resClaimer, err := claim.NewResourceClaimer(
356+
gpu.NewGPUClaimPlugin(log, "nvidia.com/gpu", pci.NewReader(log, pci.VendorNvidia, pci.Class3DController), []pci.Address{}),
357+
)
358+
351359
srv, err := server.New(server.Options{
352360
BaseURL: baseURL,
353361
Libvirt: libvirt,
@@ -356,6 +364,7 @@ func Run(ctx context.Context, opts Options) error {
356364
MachineClasses: machineClasses,
357365
VolumePlugins: volumePlugins,
358366
NetworkPlugins: nicPlugin,
367+
ResourceClaimer: resClaimer,
359368
EnableHugepages: opts.EnableHugepages,
360369
GuestAgent: opts.GuestAgent.GetAPIGuestAgent(),
361370
})

0 commit comments

Comments
 (0)