Skip to content

service entry: allow empty endpoints for static resolution#19036

Merged
istio-testing merged 1 commit intoistio:masterfrom
ramaraochavali:fix/empty_endpoints_validation
Nov 22, 2019
Merged

service entry: allow empty endpoints for static resolution#19036
istio-testing merged 1 commit intoistio:masterfrom
ramaraochavali:fix/empty_endpoints_validation

Conversation

@ramaraochavali
Copy link
Copy Markdown
Contributor

@ramaraochavali ramaraochavali commented Nov 18, 2019

For Service Entries with STATIC resolution, we should allow empty endpoints. Since we internally convert it to EDS type of cluster in Envoy - it will work and it is valid for the external service represented by the Service Entry to have zero endpoints. When such an event happens today, Pilot rejects the ServiceEntry with error "error: endpoints must be provided if service entry resolution mode is static" and all Envoys will have stale data. Another alternative is to delete the service entry and recreate it with fresh endpoints when they are available.

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@googlebot googlebot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Nov 18, 2019
@istio-testing istio-testing added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 18, 2019
@rshriram
Copy link
Copy Markdown
Member

When such an event happens today, Pilot rejects the ServiceEntry with error "error: endpoints must be provided if service entry resolution mode is static" and all Envoys will have stale data.

How will envoys have stale data when the entire service entry is rejected ?

@ramaraochavali
Copy link
Copy Markdown
Contributor Author

ramaraochavali commented Nov 22, 2019

How will envoys have stale data when the entire service entry is rejected ?

Because assume a case we have created service entry with STATIC resolution and provided 3 endpoints. Those endpoints all have gone to Envoys. Now we update the service entry and and do not set endpoints (because there are no instances of external service available now or unannounced from discovery). Pilot will reject this update because of the above validation. At this point envoys would have old data i.e. three endpoints with which it was originally created?

@istio-testing istio-testing merged commit d6d1e6e into istio:master Nov 22, 2019
@ramaraochavali ramaraochavali deleted the fix/empty_endpoints_validation branch November 22, 2019 15:34
sdake pushed a commit to sdake/istio that referenced this pull request Dec 1, 2019
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
antonioberben pushed a commit to antonioberben/istio that referenced this pull request Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/networking cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants