utilisation

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 15 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]common.ComputeResources

Types

type ClusterAvailableCapacityReport

type ClusterAvailableCapacityReport struct {
	AvailableCapacity *common.ComputeResources
	Nodes             []api.NodeInfo
}

type ClusterUtilisationService

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

func NewClusterUtilisationService

func NewClusterUtilisationService(
	clusterContext context.ClusterContext,
	queueUtilisationService PodUtilisationService,
	usageClient api.UsageClient,
	trackedNodeLabels []string,
	toleratedTaints []string) *ClusterUtilisationService

func (*ClusterUtilisationService) GetAllAvailableProcessingNodes

func (clusterUtilisationService *ClusterUtilisationService) GetAllAvailableProcessingNodes() ([]*v1.Node, error)

func (*ClusterUtilisationService) GetAvailableClusterCapacity

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

func (*ClusterUtilisationService) GetTotalAllocatableClusterCapacity

func (clusterUtilisationService *ClusterUtilisationService) GetTotalAllocatableClusterCapacity() (*common.ComputeResources, error)

func (*ClusterUtilisationService) ReportClusterUtilisation

func (clusterUtilisationService *ClusterUtilisationService) ReportClusterUtilisation()

type MetricsServerPodUtilisationService

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

func NewMetricsServerQueueUtilisationService

func NewMetricsServerQueueUtilisationService(clusterContext context.ClusterContext) *MetricsServerPodUtilisationService

func (*MetricsServerPodUtilisationService) GetPodUtilisation

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

func (*MetricsServerPodUtilisationService) RefreshUtilisationData

func (q *MetricsServerPodUtilisationService) RefreshUtilisationData()

type PodUtilisationService

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

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

func (*UtilisationEventReporter) ReportUtilisationEvents

func (r *UtilisationEventReporter) ReportUtilisationEvents()

type UtilisationService

type UtilisationService interface {
	GetAvailableClusterCapacity() (*ClusterAvailableCapacityReport, error)
	GetTotalAllocatableClusterCapacity() (*common.ComputeResources, error)
	GetAllAvailableProcessingNodes() ([]*v1.Node, error)
}

Jump to

Keyboard shortcuts

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