Skip to content

Commit e684754

Browse files
committed
add note for fallback
Signed-off-by: Mohammed Abdi <mohammed.munir.abdi@ibm.com>
1 parent cbb42c2 commit e684754

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

internal/collector/v2/pod_scraping_source.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ type PodScrapingSourceConfig struct {
2929
InferencePoolName string
3030
InferencePoolNamespace string
3131

32-
// Service discovery (auto: {poolName}-epp)
33-
ServiceName string // auto-discovered if empty
32+
// Service discovery
33+
// The scale-from-zero engine should provide ServiceName explicitly.
34+
// If empty, falls back to pattern-based discovery: {poolName}-epp
35+
ServiceName string
3436

3537
// Metrics endpoint (provided by client/engine)
3638
MetricsPort int32 // provided by client
@@ -134,6 +136,9 @@ func NewPodScrapingSource(
134136
}
135137

136138
// discoverServiceName derives service name from InferencePool name.
139+
// NOTE: This is a fallback mechanism. The scale-from-zero engine should provide
140+
// the ServiceName directly in PodScrapingSourceConfig. This pattern-based
141+
// discovery is only used if ServiceName is not explicitly set by the engine.
137142
func discoverServiceName(inferencePoolName string) string {
138143
return fmt.Sprintf("%s-epp", inferencePoolName)
139144
}

0 commit comments

Comments
 (0)