Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeLogicalCoreIDToNodeIDMap ¶
func MakeLogicalCoreIDToNodeIDMap(topo *ghw.TopologyInfo) map[int]int
Types ¶
type Args ¶
type Args struct { PodResourceSocketPath string SleepInterval time.Duration Namespace string KubeletConfigURI string APIAuthTokenFile string PodSetFingerprint bool }
Args stores commandline arguments used for resource monitoring
type ContainerResources ¶
type ContainerResources struct { Name string Resources []ResourceInfo }
ContainerResources contains information about the node resources assigned to a container
type ExcludeResourceList ¶ added in v0.12.0
type ExcludeResourceList struct {
// contains filtered or unexported fields
}
ExcludeResourceList contains a list of resources to ignore during resources scan
func NewExcludeResourceList ¶ added in v0.12.0
func NewExcludeResourceList(resMap map[string][]string, nodeName string) ExcludeResourceList
NewExcludeResourceList returns new ExcludeList with values with set.String types
func (*ExcludeResourceList) IsExcluded ¶ added in v0.12.0
func (rl *ExcludeResourceList) IsExcluded(resource corev1.ResourceName) bool
type PodResources ¶
type PodResources struct { Name string Namespace string Containers []ContainerResources }
PodResources contains information about the node resources assigned to a pod
type PodResourcesScanner ¶
type PodResourcesScanner struct {
// contains filtered or unexported fields
}
func (*PodResourcesScanner) Scan ¶
func (resMon *PodResourcesScanner) Scan() (ScanResponse, error)
Scan gathers all the PodResources from the system, using the podresources API client.
type ResourceInfo ¶
type ResourceInfo struct { Name corev1.ResourceName Data []string NumaNodeIds []int }
ResourceInfo stores information of resources and their corresponding IDs obtained from PodResource API
type ResourcesAggregator ¶
type ResourcesAggregator interface {
Aggregate(podResData []PodResources) topologyv1alpha2.ZoneList
}
ResourcesAggregator aggregates resource information based on the received data from underlying hardware and podresource API
func NewResourcesAggregator ¶
func NewResourcesAggregator(podResourceClient podresourcesapi.PodResourcesListerClient, excludeList ExcludeResourceList) (ResourcesAggregator, error)
func NewResourcesAggregatorFromData ¶
func NewResourcesAggregatorFromData(topo *ghw.TopologyInfo, resp *podresourcesapi.AllocatableResourcesResponse, memoryResourceCapacity utils.NumaMemoryResources, excludeList ExcludeResourceList) ResourcesAggregator
NewResourcesAggregatorFromData is used to aggregate resource information based on the received data from underlying hardware and podresource API
type ResourcesScanner ¶
type ResourcesScanner interface {
Scan() (ScanResponse, error)
}
ResourcesScanner gathers all the PodResources from the system, using the podresources API client
func NewPodResourcesScanner ¶
func NewPodResourcesScanner(namespace string, podResourceClient podresourcesapi.PodResourcesListerClient, kubeApihelper apihelper.APIHelpers, podFingerprint bool) (ResourcesScanner, error)
NewPodResourcesScanner creates a new ResourcesScanner instance
type ScanResponse ¶ added in v0.13.0
type ScanResponse struct { PodResources []PodResources Attributes topologyv1alpha2.AttributeList }