resourcemonitor

package
v0.0.0-...-4218d94 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

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

type ExcludeResourceList struct {
	// contains filtered or unexported fields
}

ExcludeResourceList contains a list of resources to ignore during resources scan

func NewExcludeResourceList

func NewExcludeResourceList(resMap map[string][]string, nodeName string) ExcludeResourceList

NewExcludeResourceList returns new ExcludeList with values with set.String types

func (*ExcludeResourceList) IsExcluded

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, k8sClient client.Interface, podFingerprint bool) (ResourcesScanner, error)

NewPodResourcesScanner creates a new ResourcesScanner instance

type ScanResponse

type ScanResponse struct {
	PodResources []PodResources
	Attributes   topologyv1alpha2.AttributeList
}

Jump to

Keyboard shortcuts

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