Skip to content

api: mark internal listener as implemented and change internal listener binding#22274

Merged
kyessenov merged 20 commits intoenvoyproxy:mainfrom
kyessenov:internal_listener_publish
Aug 10, 2022
Merged

api: mark internal listener as implemented and change internal listener binding#22274
kyessenov merged 20 commits intoenvoyproxy:mainfrom
kyessenov:internal_listener_publish

Conversation

@kyessenov
Copy link
Copy Markdown
Contributor

@kyessenov kyessenov commented Jul 18, 2022

Signed-off-by: Kuat Yessenov kuat@google.com

Commit Message: Expose internal listener functionality. Marks the fields as implemented. Adds the following functional changes prior to publishing:

Adds a few sample configs (and fixes #20335):

  • minimal two chained tcp_proxy listeners;
  • encap HTTP in HTTP CONNECT;
  • decap HTTP in HTTP CONNECT;

Risk Level: low, hidden prior
Testing: yes
Docs Changes: yes
Release Notes: yes

Signed-off-by: Kuat Yessenov <kuat@google.com>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy[\w/]*/(v1alpha\d?|v1|v2alpha\d?|v2))|(api/envoy/type/(matcher/)?\w+.proto).
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @adisuissa
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #22274 was opened by kyessenov.

see: more, trace.

Signed-off-by: Kuat Yessenov <kuat@google.com>
@phlax
Copy link
Copy Markdown
Member

phlax commented Jul 21, 2022

@adisuissa would you mind taking a look

/wait-any

Copy link
Copy Markdown
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning this up, left a few minor comments.
/wait

oneof address_name_specifier {
option (validate.required) = true;

// [#not-implemented-hide:] The :ref:`listener name <envoy_v3_api_field_config.listener.v3.Listener.name>` of the destination internal listener.
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.

Please keep the comment describing the field.

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.

This comment is not true, address has nothing to do with the listener name.

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.

IIUC the value here needs to point to another listener.
Would it be possible to add a reference to the field that this value will be matched to?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

seems like it changed what the value expect to from the beginning. Maybe worth to ask again whether this field still name correctly, this can be a chance to change the name before expose to the end user.

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.

Yes, I agree we need to fix this. I think we should use a dedicated field in InternalListener instead of internal address in the generic address field in Listener. WDYT?

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.

The simplest thing is to just really use the listener name. That keeps LDS to a minimum and I can't think of any reason why more flexibility would be needed here (multiple addresses don't work anyways, but can always be added to InternalListener).

Copy link
Copy Markdown
Member

@soulxu soulxu Aug 2, 2022

Choose a reason for hiding this comment

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

I'm not sure the usecase of using multiple internal addresses, it seems useless. I guess the multiple internal addresses usecase is internal address mix with IP address. From this point of view, just using the listener name should be fine.

I little prefer just use a string for the internal address, needn't limit that to the listener name. The only reason I have is a soft reason, it seems more straightforward for me when configuring the internal address, just matching the upstream endpoint internal address with the listener internal address. And we needn't add a lot of checks in the code like the user can't specific addresses when this is internal listener...etc. But anyway those are soft reasons.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure the usecase of using multiple internal addresses, it seems useless. I guess the multiple addresses usecase is internal address mix with IP address. From this point of view, just use the listener name should be fine.

suddenly found this may be the multiple internal addresses usecase https://github.com/envoyproxy/envoy/pull/22274/files#r935253240

Signed-off-by: Kuat Yessenov <kuat@google.com>
@alyssawilk
Copy link
Copy Markdown
Contributor

Looks like a simple API change: throwing over to @htuch as Adi is out.
@kyessenov should this also have a release note as well?

adisuissa
adisuissa previously approved these changes Aug 1, 2022
Copy link
Copy Markdown
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

/lgtm api,
thanks!

@repokitteh-read-only
Copy link
Copy Markdown

no relevant owners for "api,"

🐱

Caused by: a #22274 (review) was submitted by @adisuissa.

see: more, trace.

@repokitteh-read-only repokitteh-read-only bot removed the api label Aug 1, 2022
@adisuissa
Copy link
Copy Markdown
Contributor

@kyessenov following Alyssa's comment, if the server_listener_name field now implemented, then a release note should be added.

@alyssawilk alyssawilk assigned adisuissa and alyssawilk and unassigned adisuissa and htuch Aug 1, 2022
@alyssawilk
Copy link
Copy Markdown
Contributor

/wait on review notes - I'm happy to do that pass. I think if we don't have example configs we're going to want that as part of making this non-hidden.

Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov
Copy link
Copy Markdown
Contributor Author

Affected by #22483.

@alyssawilk alyssawilk assigned snowp and unassigned alyssawilk Aug 8, 2022
@kyessenov
Copy link
Copy Markdown
Contributor Author

/retest
(emsdk download returned 500)

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Check envoy-presubmit isn't fully completed, but will still attempt retrying.
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #22274 (comment) was created by @kyessenov.

see: more, trace.

@kyessenov
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #22274 (comment) was created by @kyessenov.

see: more, trace.

Copy link
Copy Markdown
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

/lgtm api

@repokitteh-read-only repokitteh-read-only bot removed the api label Aug 9, 2022
Copy link
Copy Markdown
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

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

Not familiar enough with the internal listener work to give a true in depth review, but high level this looks good to me, just a docs comment

Comment on lines +62 to +64
In case there are multiple endpoints referencing the same internal listener in a single upstream cluster, use
:ref:`endpoint ID field <envoy_v3_api_field_config.core.v3.EnvoyInternalAddress.endpoint_id>` to improve change tracking
in the cluster pool. This field in combination with the internal listener name uniquely identify an endpoint in the
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.

What happens if you don't use the endpoint id in case? What do you end up losing out on? Or does it just not work?

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.

It'll de-duplicate the internal addresses. The same happens for IP:PORTs, but not well-documented. This is due to HostMap using strings as a key for host tracking. Should we add this comment here?

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.

I think it would be helpful to either make the language prescriptive (you should do this when multiple IPs to ensure X) or help the reader understand what this does if we want to talk about this as an optional thing to do

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.

Done.

Signed-off-by: Kuat Yessenov <kuat@google.com>
snowp
snowp previously approved these changes Aug 9, 2022
Copy link
Copy Markdown
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Copy Markdown
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

/lgtm api

@kyessenov
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Check envoy-presubmit isn't fully completed, but will still attempt retrying.
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #22274 (comment) was created by @kyessenov.

see: more, trace.

@kyessenov
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Check envoy-presubmit isn't fully completed, but will still attempt retrying.
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #22274 (comment) was created by @kyessenov.

see: more, trace.

@kyessenov
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #22274 (comment) was created by @kyessenov.

see: more, trace.

@kyessenov
Copy link
Copy Markdown
Contributor Author

Thanks @lambdai for doing the actual work! Hopefully we can get more usage and value now that it's public and easily available.

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.

corrupt stats for internal listener Consume bootstrap_extension in config_test

9 participants