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
type NumaInfoGetter ¶
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
Click to show internal directories.
Click to hide internal directories.