Skip to content

Commit

Permalink
cr 1
Browse files Browse the repository at this point in the history
  • Loading branch information
enoodle committed Aug 20, 2024
1 parent 4e370cb commit cb76c82
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@ import (
cmhandler "github.com/run-ai/fake-gpu-operator/internal/kwok-gpu-device-plugin/handlers/configmap"

v1 "k8s.io/api/core/v1"
listersv1 "k8s.io/client-go/listers/core/v1"

"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"
)

type ConfigMapController struct {
kubeClient kubernetes.Interface
cmInformer cache.SharedIndexInformer
nodeLister listersv1.NodeLister
informerFactory informers.SharedInformerFactory
handler cmhandler.Interface
kubeClient kubernetes.Interface
cmInformer cache.SharedIndexInformer
handler cmhandler.Interface

clusterTopology *topology.ClusterTopology
}
Expand All @@ -43,8 +40,6 @@ func NewConfigMapController(
c := &ConfigMapController{
kubeClient: kubeClient,
cmInformer: informerFactory.Core().V1().ConfigMaps().Informer(),
nodeLister: informerFactory.Core().V1().Nodes().Lister(),
informerFactory: informerFactory,
handler: cmhandler.NewConfigMapHandler(kubeClient, clusterTopology),
clusterTopology: clusterTopology,
}
Expand Down Expand Up @@ -75,7 +70,7 @@ func NewConfigMapController(

func (c *ConfigMapController) Run(stopCh <-chan struct{}) {
log.Println("Starting config map controller")
c.informerFactory.Start(stopCh)
c.cmInformer.Run(stopCh)
}

func (c *ConfigMapController) isFakeGpuKWOKNodeConfigMap(cm *v1.ConfigMap) bool {
Expand Down

0 comments on commit cb76c82

Please sign in to comment.