resourcepackage

package
v0.5.39 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricScope = "resource-package"
)

Variables

This section is empty.

Functions

func ConvertResourcePackagesToNPDMetrics

func ConvertResourcePackagesToNPDMetrics(resourcePackageMetrics []ResourcePackageMetric, timestamp metav1.Time) []nodev1alpha1.ScopedNodeMetrics

ConvertResourcePackagesToNPDMetrics converts resource packages to NPD metrics. converted npd metrics are sorted by packageName, numaID, and metricName

func GetResourcePackageName

func GetResourcePackageName(annotations map[string]string) string

GetResourcePackageName retrieves the resource package name from pod annotations. It looks for the key "katalyst.kubewharf.io/resource_package" in the annotations map.

Parameters:

  • annotations: A map of pod annotations where to look for the resource package name.

Returns:

  • string: The resource package name if found, otherwise an empty string.

Types

type ResourcePackageMetric

type ResourcePackageMetric struct {
	NumaID           string                         `json:"numaID"`
	ResourcePackages []nodev1alpha1.ResourcePackage `json:"resourcePackages"`
}

func ConvertNPDMetricsToResourcePackages

func ConvertNPDMetricsToResourcePackages(metrics []nodev1alpha1.ScopedNodeMetrics) []ResourcePackageMetric

ConvertNPDMetricsToResourcePackages converts NPD metrics to resource packages. converted resource packages are sorted by packageName and numaID

Jump to

Keyboard shortcuts

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