utilisation

package
v0.9.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllocationByQueue

func GetAllocationByQueue(pods []*v1.Pod) map[string]armadaresource.ComputeResources

func GetAllocationByQueueAndPriority

func GetAllocationByQueueAndPriority(pods []*v1.Pod) map[string]map[int32]armadaresource.ComputeResources

Types

type ClusterAvailableCapacityReport

type ClusterAvailableCapacityReport struct {
	AvailableCapacity *armadaresource.ComputeResources
	Nodes             []executorapi.NodeInfo
}

type ClusterUtilisationService

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

func NewClusterUtilisationService

func NewClusterUtilisationService(
	clusterContext context.ClusterContext,
	queueUtilisationService PodUtilisationService,
	nodeInfoService node.NodeInfoService,
	trackedNodeLabels []string,
	nodeIdLabel string,
	minimumResourcesMarkedAllocatedToNonArmadaPodsPerNode armadaresource.ComputeResources,
	minimumResourcesMarkedAllocatedToNonArmadaPodsPerNodePriority int32,
) *ClusterUtilisationService

func (*ClusterUtilisationService) GetAllNodeGroupAllocationInfo

func (clusterUtilisationService *ClusterUtilisationService) GetAllNodeGroupAllocationInfo() ([]*NodeGroupAllocationInfo, error)

GetAllNodeGroupAllocationInfo returns allocation information for all nodes on the cluster. NodeGroupCapacity is the total capacity of a nodegroup (including cordoned nodes) NodeGroupAllocatableCapacity is the capacity available to armada on schedulable nodes NodeGroupCordonedCapacity is the resource in use by armada on unschedulable nodes

func (*ClusterUtilisationService) GetAvailableClusterCapacity

func (cls *ClusterUtilisationService) GetAvailableClusterCapacity() (*ClusterAvailableCapacityReport, error)

type NodeGroupAllocationInfo

type NodeGroupAllocationInfo struct {
	NodeType                     string
	Nodes                        []*v1.Node
	NodeGroupCapacity            armadaresource.ComputeResources
	NodeGroupAllocatableCapacity armadaresource.ComputeResources
	NodeGroupCordonedCapacity    armadaresource.ComputeResources
}

type PodUtilisationService

type PodUtilisationService interface {
	GetPodUtilisation(pod *v1.Pod) *domain.UtilisationData
}

type PodUtilisationServiceImpl added in v0.3.47

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

func NewPodUtilisationService added in v0.3.47

func NewPodUtilisationService(
	clusterContext cluster_context.ClusterContext,
	nodeInfoService node.NodeInfoService,
	customConfigs []configuration.CustomUsageMetrics,
	httpClient *http.Client,
) *PodUtilisationServiceImpl

func (*PodUtilisationServiceImpl) GetPodUtilisation added in v0.3.47

func (q *PodUtilisationServiceImpl) GetPodUtilisation(pod *v1.Pod) *domain.UtilisationData

func (*PodUtilisationServiceImpl) RefreshUtilisationData added in v0.3.47

func (q *PodUtilisationServiceImpl) RefreshUtilisationData()

type UtilisationEventReporter

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

func NewUtilisationEventReporter

func NewUtilisationEventReporter(
	clusterContext clusterContext.ClusterContext,
	podUtilisation PodUtilisationService,
	eventReporter reporter.EventReporter,
	reportingPeriod time.Duration,
) (*UtilisationEventReporter, error)

func (*UtilisationEventReporter) ReportUtilisationEvents

func (r *UtilisationEventReporter) ReportUtilisationEvents()

type UtilisationService

type UtilisationService interface {
	GetAvailableClusterCapacity() (*ClusterAvailableCapacityReport, error)
	GetAllNodeGroupAllocationInfo() ([]*NodeGroupAllocationInfo, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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