-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Remove usage of service instances for proxy #46295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
istio-testing
merged 1 commit into
istio:master
from
howardjohn:pilot/stop-service-instances
Aug 8, 2023
Merged
Remove usage of service instances for proxy #46295
istio-testing
merged 1 commit into
istio:master
from
howardjohn:pilot/stop-service-instances
Aug 8, 2023
Conversation
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
121ecee
to
560bd47
Compare
hzxuzhonghu
reviewed
Aug 4, 2023
pilot/pkg/serviceregistry/kube/controller/serviceexportcache_test.go
Outdated
Show resolved
Hide resolved
hzxuzhonghu
reviewed
Aug 4, 2023
hzxuzhonghu
reviewed
Aug 4, 2023
560bd47
to
a17bb34
Compare
a17bb34
to
39cc168
Compare
Merged
39cc168
to
4566d5e
Compare
4566d5e
to
5d6a06f
Compare
5d6a06f
to
a599858
Compare
hzxuzhonghu
reviewed
Aug 8, 2023
a599858
to
505edd4
Compare
stevenctl
reviewed
Aug 8, 2023
Split out from https://github.com/istio/istio/pull/46295/files This *is* user facing. If a user had a pod without Service before, we would ignore locality. Now we do not. I *think* this is the last case of "You must have a service" requirement, but need more investigation before we fully drop that from https://istio.io/latest/docs/ops/deployment/requirements/
505edd4
to
8242d43
Compare
stevenctl
reviewed
Aug 8, 2023
@@ -863,8 +863,8 @@ func (c *Controller) GetProxyServiceInstances(proxy *model.Proxy) []*model.Servi | |||
return nil | |||
} | |||
|
|||
func (c *Controller) serviceInstancesFromWorkloadInstance(si *model.WorkloadInstance) []*model.ServiceInstance { | |||
out := make([]*model.ServiceInstance, 0) | |||
func (c *Controller) serviceInstancesFromWorkloadInstance(si *model.WorkloadInstance) []model.ServiceTarget { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
func (c *Controller) serviceInstancesFromWorkloadInstance(si *model.WorkloadInstance) []model.ServiceTarget { | |
func (c *Controller) serviceTargetsFromWorkloadInstance(si *model.WorkloadInstance) []model.ServiceTarget { |
stevenctl
approved these changes
Aug 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
/retest |
aryan16
approved these changes
Aug 8, 2023
howardjohn
added a commit
to howardjohn/istio.io
that referenced
this pull request
Aug 10, 2023
istio-testing
pushed a commit
to istio/istio.io
that referenced
this pull request
Sep 5, 2023
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
release-notes-none
Indicates a PR that does not require release notes.
size/XXL
Denotes a PR that changes 1000+ lines, ignoring generated files.
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.
Fixes #45241.
This PR swaps out ServiceInstances for ServiceTarget (an existing type
in XDS gen, now moved to model).
The intent here is to minimize the amount of information maintained.
Before, we had a Service+Endpoint+Port. Now we just have a Service+Port.
The Endpoint aspect was never used and was incorrect (see issue). Having
this extra information is dangerous, complex, and slow. By removing this
we can skip some wasteful processing, avoid accidentally using this
information that may or may not be accurate, etc. In the past, similar
"Struct is bigger than it needs to be" issues caused serious
regressions.
This change also can enable future optimizations.
The InstancesByPort usages:
ResolveGatewayInstances for status; known to be broken
Just whether there is instances on which ports
BestEffortInferServiceMTLSMode
Just need TLS mode
buildLocalityLbEndpoints:
Just endpoint (it mirrors EDS)
buildSidecarOutboundListeners:
for headless building. Just need endpoint address
BuildNameTable:
for headless. Its actually broken today a bit
We want each endpoint