Skip to content

fix: derive config-reloader port from http.listenAddr - #2585

Open
cesium147 wants to merge 4 commits into
VictoriaMetrics:masterfrom
cesium147:fix/config-reloader-http-listen-addr-port
Open

fix: derive config-reloader port from http.listenAddr#2585
cesium147 wants to merge 4 commits into
VictoriaMetrics:masterfrom
cesium147:fix/config-reloader-http-listen-addr-port

Conversation

@cesium147

Copy link
Copy Markdown

Parse ConfigReloaderExtraArgs["http.listenAddr"] into ContainerPort, probes, named scrape targets, and WaitForConfigReloadHash so hostNetwork DaemonSets can use distinct reloader ports without scheduler conflicts.

Fixes #2584

Parse ConfigReloaderExtraArgs["http.listenAddr"] into ContainerPort,
probes, named scrape targets, and WaitForConfigReloadHash so hostNetwork
DaemonSets can use distinct reloader ports without scheduler conflicts.

Fixes VictoriaMetrics#2584

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread internal/controller/operator/factory/reconcile/config_reload.go Outdated
@vrutkovs

vrutkovs commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Please don't merge this yet - it looks unnecessarily complicated and relies on static container name, which may be undesirable

Find the config-reloader HTTP port by its stable reloader-http name.
Drop the container-name dependency and arbitrary first-port fallback.
}

// withConfigReloaderMetricsResponse stubs the sidecar /metrics body in-process. httptest is
// unreliable here when loopback is broken, so the wait tests drive an injected Transport.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what "loopback is broken" means - could you provide an example? There are other places where we read metrics (i.e. vmdistributed) - do we need to make the same change there too?

I like the improvement in test UX, but the roundtrip change looks excessive

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. The transport stub was local test-environment noise and does
not belong in this PR. Sorry for adding it.

I restored the existing httptest pattern and removed configReloadNewHTTPClient,
roundTripFunc, and the loopback comment. The remaining change only resolves
the configured reloader port from the PodSpec so WaitForConfigReloadHash uses
the same port as the container and probes.

Ivan Kolesnikov and others added 2 commits September 7, 2026 14:37
Keep the existing httptest pattern and remove the local HTTP transport
workaround from the config-reloader port change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

config-reloader ContainerPort ignores configReloaderExtraArgs http.listenAddr (hostNetwork port conflict)

2 participants