Skip to content

Commit

Permalink
fix kwok device plugin app config
Browse files Browse the repository at this point in the history
  • Loading branch information
enoodle committed Aug 15, 2024
1 parent 62b10f0 commit 1df0f55
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/kwok-gpu-device-plugin/app.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package kwokgdp

import (
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"

Expand All @@ -18,8 +17,9 @@ var KubeClientFn = func(c *rest.Config) kubernetes.Interface {
return kubernetes.NewForConfigOrDie(c)
}

var DynamicClientFn = func(c *rest.Config) dynamic.Interface {
return dynamic.NewForConfigOrDie(c)
type StatusUpdaterAppConfiguration struct {
TopologyCmName string `mapstructure:"TOPOLOGY_CM_NAME" validate:"required"`
TopologyCmNamespace string `mapstructure:"TOPOLOGY_CM_NAMESPACE" validate:"required"`
}

type KWOKDevicePluginApp struct {
Expand Down Expand Up @@ -57,5 +57,7 @@ func (app *KWOKDevicePluginApp) Name() string {
}

func (app *KWOKDevicePluginApp) GetConfig() interface{} {
return nil
var config StatusUpdaterAppConfiguration

return config
}

0 comments on commit 1df0f55

Please sign in to comment.