Skip to content

listener: allow overriding static listeners via LDS#44940

Open
AntonKanug wants to merge 1 commit into
envoyproxy:mainfrom
AntonKanug:antonk/dynamic-override
Open

listener: allow overriding static listeners via LDS#44940
AntonKanug wants to merge 1 commit into
envoyproxy:mainfrom
AntonKanug:antonk/dynamic-override

Conversation

@AntonKanug
Copy link
Copy Markdown
Contributor

Fixes #39510

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only
Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #44940 was opened by AntonKanug.

see: more, trace.

Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>
@AntonKanug AntonKanug force-pushed the antonk/dynamic-override branch from 3bae7ab to 2bf0f37 Compare May 8, 2026 12:20
Comment on lines +455 to +458
// Until LDS delivers a listener with a matching name the listener remains static, and an
// LDS state-of-the-world response that omits this name will not remove it. Once LDS does
// deliver a matching listener the static instance is replaced, and the replacement is
// thereafter treated as a regular dynamic listener (subject to LDS updates and removals).
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

let me know if this behaviour makes sense, other option is give LDS SOTW response remove the listener if its not in the response.

@AntonKanug AntonKanug marked this pull request as ready for review May 8, 2026 13:43
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @wbpcode
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #44940 was ready_for_review by AntonKanug.

see: more, trace.

@kyessenov
Copy link
Copy Markdown
Contributor

Waiting for API review before code review.
/wait

@adisuissa
Copy link
Copy Markdown
Contributor

Overriding a static resource (not necessarily a listener) with a dynamic one is discouraged due to the edge cases that it introduces.

Can you please add an explanation about the lifetime of the listeners.
Specifically, please describe cases where there's a statically defined listener, then a dynamic listener is added, and then it is removed. Please consider all the edge cases that you are aware of and add the relevant tests that cover them.

@wbpcode
Copy link
Copy Markdown
Member

wbpcode commented May 13, 2026

Thanks for this contribution. I am also be very curious about the actual scenarios that require this feature, could you add more background context about that? If dynamic updating is necessary, why not just use the dynamic listener directly? You can mark the Envoy instance be ready until the necessary listeners are ready?

@AntonKanug
Copy link
Copy Markdown
Contributor Author

Our exact usecase is we run envoy as a sidecar and route a pod's DNS to envoy and use envoys DNS filter. We want the ability to override DNS resolutions to some known IPs. These resolution overrides can change at runtime so it needs to be set via the control plane.

As a result this DNS listener is dynamic, if envoy cant reach the control plane, pod's DNS fails entirely since its routed to a listener that doesnt exist. If we have a static config, we lose the resolution overrides but DNS doesnt fail entirely which is a better failure mode.

One option is making that iptables routing to listener dynamic so that we can gate the routing on envoy having the listener setup and other is always having a static config and overriding it to a dynamic listener.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question - How to initialize envoy with a listener which is overridden by the control plane after

4 participants