[operator] Add autoscaler metrics port to BuildAutoscalerContainer#4672
Open
ashutosh1807 wants to merge 1 commit intoray-project:masterfrom
Open
[operator] Add autoscaler metrics port to BuildAutoscalerContainer#4672ashutosh1807 wants to merge 1 commit intoray-project:masterfrom
ashutosh1807 wants to merge 1 commit intoray-project:masterfrom
Conversation
The autoscaler sidecar serves Prometheus metrics on port 44217, but BuildAutoscalerContainer did not declare a containerPort for it. This prevented the PodMonitor from discovering the as-metrics endpoint when enableInTreeAutoscaling is true. Fixes ray-project#4671 Signed-off-by: Ashutosh Agarwal <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BuildAutoscalerContainer()creates the autoscaler sidecar withEnv,Command,Args, andResourcesbut noPorts. The autoscaler process serves Prometheus metrics on port 44217 (AUTOSCALER_METRIC_PORT), and the official PodMonitor scrapesport: as-metrics— but without a declaredcontainerPort, Prometheus can't discover the endpoint.This adds
containerPort: 44217with nameas-metricsto the injected sidecar container, so the PodMonitor works out of the box whenenableInTreeAutoscaling: true.Fixes #4671
Changes
controllers/ray/utils/constant.go: AddDefaultAutoscalerMetricsPort(44217) andAutoscalerMetricsPortName("as-metrics") constantscontrollers/ray/common/pod.go: Declare the port inBuildAutoscalerContainer()controllers/ray/common/pod_test.go: Update test fixture to include the new port