topology

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 31 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	// GetTopologyZones return newest topology zone status
	GetTopologyZones(ctx context.Context) ([]*nodev1alpha1.TopologyZone, error)

	// GetTopologyPolicy return newest topology policy status
	GetTopologyPolicy(ctx context.Context) (nodev1alpha1.TopologyPolicy, error)

	// Run is to start the topology adapter to watch the topology change
	Run(ctx context.Context, handler func()) error
}

Adapter is to get topology zone status, the src of that can be pod resource api or kubelet checkpoint.

func NewPodResourcesServerTopologyAdapter

func NewPodResourcesServerTopologyAdapter(metaServer *metaserver.MetaServer, qosConf *generic.QoSConfiguration,
	endpoints []string, kubeletResourcePluginPaths []string, resourceNameToZoneTypeMap map[string]string,
	skipDeviceNames sets.String, numaInfoGetter NumaInfoGetter, podResourcesFilter PodResourcesFilter,
	getClientFunc podresources.GetClientFunc, needValidationResources []string) (Adapter, error)

NewPodResourcesServerTopologyAdapter creates a topology adapter which uses pod resources server

type DummyAdapter

type DummyAdapter struct{}

DummyAdapter is a dummy topology adapter for test

func (DummyAdapter) GetTopologyPolicy added in v0.3.0

func (d DummyAdapter) GetTopologyPolicy(_ context.Context) (nodev1alpha1.TopologyPolicy, error)

GetTopologyPolicy is to get dummy topology policy status

func (DummyAdapter) GetTopologyZones added in v0.2.0

func (d DummyAdapter) GetTopologyZones(_ context.Context) ([]*nodev1alpha1.TopologyZone, error)

GetTopologyZones is to get dummy topology zone status

func (DummyAdapter) Run

func (d DummyAdapter) Run(_ context.Context, _ func()) error

Run is to start the dummy topology adapter

type NumaInfoGetter

type NumaInfoGetter func() ([]info.Node, error)

NumaInfoGetter is to get numa info

type PodResourcesFilter added in v0.2.0

type PodResourcesFilter func(*v1.Pod, *podresv1.PodResources) (*podresv1.PodResources, error)

PodResourcesFilter is to filter pod resources which does need to be reported

func GenericPodResourcesFilter added in v0.4.1

func GenericPodResourcesFilter(qosConf *generic.QoSConfiguration) PodResourcesFilter

GenericPodResourcesFilter is used to filter pod resources by qos conf

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL