Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvMonitoringEnabled = envPrefix + "ENABLED" // EnvMetricsEndpoint is the metrics endpoint to use EnvMetricsEndpoint = envPrefix + "METRICS_ENDPOINT" // EnvPollingInterval is the polling interval to run the GPU metrics poller EnvPollingInterval = envPrefix + "POLLING_INTERVAL" )
Environment variable keys.
View Source
const (
MetricsComponentName = "KaiwoResourceMonitor"
)
Variables ¶
This section is empty.
Functions ¶
func GetKaiwoWorkload ¶
func IsMetricsMonitoringEnabled ¶
func IsMetricsMonitoringEnabled() bool
Types ¶
type GpuMetricsEntry ¶ added in v0.1.5
type GpuMetricsEntry struct {
Namespace string
PodName string
ContainerName string
GpuID string
GpuPartitionID string
UtilizationPercentage float64
AssociatedPod *corev1.Pod
}
func (*GpuMetricsEntry) IsValid ¶ added in v0.1.5
func (entry *GpuMetricsEntry) IsValid() bool
func (*GpuMetricsEntry) Key ¶ added in v0.1.5
func (entry *GpuMetricsEntry) Key() string
type MetricsWatcher ¶
type MetricsWatcher struct {
// contains filtered or unexported fields
}
MetricsWatcher polls Prometheus and updates Kaiwo statuses.
func NewMetricsWatcher ¶
func NewMetricsWatcher( endpoint string, pollInterval time.Duration, k8sClient client.Client, scheme *runtime.Scheme, recorder record.EventRecorder, ) (*MetricsWatcher, error)
NewMetricsWatcher creates a watcher; check template.Err on parse.
func NewMetricsWatcherFromEnv ¶
func NewMetricsWatcherFromEnv( k8sClient client.Client, scheme *runtime.Scheme, recorder record.EventRecorder, ) (*MetricsWatcher, error)
NewMetricsWatcherFromEnv constructs a MetricsWatcher from environment variables.
Click to show internal directories.
Click to hide internal directories.