Documentation
¶
Overview ¶
Package gpuscheduler has the logic for the scheduler extender - including the server it starts and filter methods
Index ¶
- type Cache
- type CacheAPI
- type Card
- type DescheduledTilesMap
- type DisabledTilesMap
- type GASExtender
- type InternalCacheAPI
- type MockCacheAPI
- func (_m *MockCacheAPI) AdjustPodResourcesL(cache *Cache, pod *v1.Pod, adj bool, annotation string, tileAnnotation string, ...) error
- func (_m *MockCacheAPI) FetchNode(cache *Cache, nodeName string) (*v1.Node, error)
- func (_m *MockCacheAPI) FetchPod(cache *Cache, podNS string, podName string) (*v1.Pod, error)
- func (_m *MockCacheAPI) GetNodeResourceStatus(cache *Cache, nodeName string) nodeResources
- func (_m *MockCacheAPI) GetNodeTileStatus(cache *Cache, nodeName string) nodeTiles
- func (_m *MockCacheAPI) NewCache(_a0 kubernetes.Interface) *Cache
- type MockInternalCacheAPI
- type PreferredTilesMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache : basically all things cached, including the resulting resource usage statuses per card Nodes cache is needed for incoming scheduling request so that not all node objects need to be sent for every scheduled pod. Also for detecting new labels in nodes. Pods cache is needed during the scheduling request so that not all pods need to be read from all nodes for every scheduled pod. The cache could be accessed from multiple goroutines and therefore needs concurrency protection, which is achieved with a mutex.
func NewCache ¶
func NewCache(client kubernetes.Interface) *Cache
NewCache returns a new Cache object.
type CacheAPI ¶
type CacheAPI interface { NewCache(client kubernetes.Interface) *Cache FetchNode(cache *Cache, nodeName string) (*v1.Node, error) FetchPod(cache *Cache, podNS, podName string) (*v1.Pod, error) GetNodeResourceStatus(cache *Cache, nodeName string) nodeResources GetNodeTileStatus(cache *Cache, nodeName string) nodeTiles AdjustPodResourcesL(cache *Cache, pod *v1.Pod, adj bool, annotation, tileAnnotation, nodeName string) error }
CacheAPI is the mocked interface for the Cache used by the scheduler.
type Card ¶ added in v0.5.0
type Card struct {
// contains filtered or unexported fields
}
Card represents a selected gpuName and optional xeLinkedTileIds to be used.
type DescheduledTilesMap ¶ added in v0.3.0
type DisabledTilesMap ¶ added in v0.3.0
type GASExtender ¶
type GASExtender struct {
// contains filtered or unexported fields
}
GASExtender is the scheduler extension part.
func NewGASExtender ¶
func NewGASExtender(clientset kubernetes.Interface, enableAllowlist, enableDenylist bool, balanceResource string, ) *GASExtender
NewGASExtender returns a new GAS Extender.
func (*GASExtender) Bind ¶
func (m *GASExtender) Bind(writer http.ResponseWriter, request *http.Request)
Bind binds the pod to the node.
func (*GASExtender) Filter ¶
func (m *GASExtender) Filter(writer http.ResponseWriter, request *http.Request)
Filter manages all filter requests from the scheduler. First it decodes the request, then it calls the filter logic and writes a response to the scheduler.
func (*GASExtender) Prioritize ¶
func (m *GASExtender) Prioritize(w http.ResponseWriter, _ *http.Request)
Prioritize manages all prioritize requests from the scheduler extender. Not implemented yet by GAS, hence response with StatusNotFound.
type InternalCacheAPI ¶
type InternalCacheAPI interface {
WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...cache.InformerSynced) bool
}
InternalCacheAPI has the mocked interface of Cache internals.
type MockCacheAPI ¶
MockCacheAPI is an autogenerated mock type for the CacheAPI type
func (*MockCacheAPI) AdjustPodResourcesL ¶ added in v0.2.0
func (_m *MockCacheAPI) AdjustPodResourcesL(cache *Cache, pod *v1.Pod, adj bool, annotation string, tileAnnotation string, nodeName string) error
AdjustPodResourcesL provides a mock function with given fields: cache, pod, adj, annotation, tileAnnotation, nodeName
func (*MockCacheAPI) FetchNode ¶
FetchNode provides a mock function with given fields: cache, nodeName
func (*MockCacheAPI) FetchPod ¶ added in v0.2.0
FetchPod provides a mock function with given fields: cache, podNS, podName
func (*MockCacheAPI) GetNodeResourceStatus ¶
func (_m *MockCacheAPI) GetNodeResourceStatus(cache *Cache, nodeName string) nodeResources
GetNodeResourceStatus provides a mock function with given fields: cache, nodeName
func (*MockCacheAPI) GetNodeTileStatus ¶ added in v0.3.0
func (_m *MockCacheAPI) GetNodeTileStatus(cache *Cache, nodeName string) nodeTiles
GetNodeTileStatus provides a mock function with given fields: cache, nodeName
func (*MockCacheAPI) NewCache ¶
func (_m *MockCacheAPI) NewCache(_a0 kubernetes.Interface) *Cache
NewCache provides a mock function with given fields: _a0
type MockInternalCacheAPI ¶
MockInternalCacheAPI is an autogenerated mock type for the InternalCacheAPI type
func (*MockInternalCacheAPI) WaitForCacheSync ¶
func (_m *MockInternalCacheAPI) WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...cache.InformerSynced) bool
WaitForCacheSync provides a mock function with given fields: stopCh, cacheSyncs