helpers

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpdateCPU             = "UpdateCPU"
	UpdateMemory          = "UpdateMemory"
	UpdateCgroups         = "UpdateCgroups" // update cgroups excluding the options already stated above
	UpdateSystemConfig    = "UpdateSystemConfig"
	UpdateResctrlSchemata = "UpdateResctrlSchemata" // update resctrl l3 cat schemata
	UpdateResctrlTasks    = "UpdateResctrlTasks"    // update resctrl tasks

	EvictPodByNodeMemoryUsage   = "EvictPodByNodeMemoryUsage"
	EvictPodByBECPUSatisfaction = "EvictPodByBECPUSatisfaction"

	AdjustBEByNodeCPUUsage = "AdjustBEByNodeCPUUsage"

	EvictPodSuccess = "evictPodSuccess"
	EvictPodFail    = "evictPodFail"
)

Variables

This section is empty.

Functions

func CollectAllPodMetrics

func CollectAllPodMetrics(statesInformer statesinformer.StatesInformer, metricCache metriccache.MetricCache,
	queryParam metriccache.QueryParam, metricResource metriccache.MetricResource) map[string]float64

func CollectAllPodMetricsLast

func CollectAllPodMetricsLast(statesInformer statesinformer.StatesInformer, metricCache metriccache.MetricCache,
	metricResource metriccache.MetricResource, metricCollectInterval time.Duration) map[string]float64

func CollectContainerResMetricLast

func CollectContainerResMetricLast(metricCache metriccache.MetricCache, queryMeta metriccache.MetricMeta,
	metricCollectInterval time.Duration) (float64, error)

func CollectContainerThrottledMetric

func CollectContainerThrottledMetric(metricCache metriccache.MetricCache, containerID *string,
	metricCollectInterval time.Duration) (metriccache.AggregateResult, error)

func CollectNodeMetrics

func CollectNodeMetrics(metricCache metriccache.MetricCache, start, end time.Time, queryMeta metriccache.MetricMeta) (metriccache.AggregateResult, error)

func CollectPodMetric

func CollectPodMetric(metricCache metriccache.MetricCache, queryMeta metriccache.MetricMeta, start, end time.Time) (metriccache.AggregateResult, error)

func CollectPodMetricLast

func CollectPodMetricLast(metricCache metriccache.MetricCache, queryMeta metriccache.MetricMeta,
	metricCollectInterval time.Duration) (float64, error)

func CollectorNodeMetricLast

func CollectorNodeMetricLast(metricCache metriccache.MetricCache, queryMeta metriccache.MetricMeta, metricCollectInterval time.Duration) (float64, error)

func GenerateQueryParamsAvg

func GenerateQueryParamsAvg(windowSeconds int64) *metriccache.QueryParam

func GenerateQueryParamsLast

func GenerateQueryParamsLast(windowDuration time.Duration) *metriccache.QueryParam

func GetKubeQoSResourceQoSByQoSClass

func GetKubeQoSResourceQoSByQoSClass(qosClass corev1.PodQOSClass, strategy *slov1alpha1.ResourceQOSStrategy) *slov1alpha1.ResourceQOS

getKubeQoSResourceQoSByQoSClass gets pod config by mapping kube qos into koordinator qos. https://koordinator.sh/docs/core-concepts/qos/#koordinator-qos-vs-kubernetes-qos

func GetPodResourceQoSByQoSClass

func GetPodResourceQoSByQoSClass(pod *corev1.Pod, strategy *slov1alpha1.ResourceQOSStrategy) *slov1alpha1.ResourceQOS

func KillContainers

func KillContainers(pod *corev1.Pod, message string)

KillContainers kills containers inside the pod

Types

This section is empty.

Jump to

Keyboard shortcuts

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