Skip to content
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

Added support for endpointslices #5798

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ajaychoudhary-hotstar
Copy link

@ajaychoudhary-hotstar ajaychoudhary-hotstar commented Oct 28, 2024

Description

Currently Ingress is doing service discovery from endpoint objects, there is is hard limit of 1K IP address that k8s endpoint objects can hold which breaks load balancing if some backends scale more than 1K.

Related Issues

(#5167)

Testing

Tested in lower env, scaled the backend system to 1.2K pods, and noticed the same 1.2K in backend metrics envoy_cluster_membership_total.

Checklist

  • Does my change need to be backported to a previous release?

    • What backport versions were discussed with the Maintainers in the Issue?
  • I made sure to update CHANGELOG.md.

    Remember, the CHANGELOG needs to mention:

    • Any new features
    • Any changes to our included version of Envoy
    • Any non-backward-compatible changes
    • Any deprecations
  • This is unlikely to impact how the Ambassador performs at scale.

    Remember, things that might have an impact at scale include:

    • Any significant changes in memory use that might require adjusting the memory limits
    • Any significant changes in CPU use that might require adjusting the CPU limits
    • Anything that might change how many replicas users should use
    • Changes that impact data-plane latency/scalability
  • My change is adequately tested.

    Remember when considering testing:

    • Your change needs to be specifically covered by tests.
      • Tests need to cover all the states where your change is relevant: for example, if you add a behavior that can be enabled or disabled, you'll need tests that cover the enabled case and tests that cover the disabled case. It's not sufficient just to test with the behavior enabled.
    • You also need to make sure that the entire area being changed has adequate test coverage.
      • If existing tests don't actually cover the entire area being changed, add tests.
      • This applies even for aspects of the area that you're not changing – check the test coverage, and improve it if needed!
    • We should lean on the bulk of code being covered by unit tests, but...
    • ... an end-to-end test should cover the integration points
  • I updated CONTRIBUTING.md with any special dev tricks I had to use to work on this code efficiently.

  • The changes in this PR have been reviewed for security concerns and adherence to security best practices.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. go Pull requests that update Go code t:feature New feature or enhancement request labels Oct 28, 2024
Copy link
Member

@kflynn kflynn left a comment

Choose a reason for hiding this comment

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

@ajaychoudhary-hotstar, many thanks for diving into this! The mechanics of how you're dealing with EndpointSlices look reasonable to me, but I need to make your life a little harder, I'm afraid -- I've run into at least one case where there were no EndpointSlices but there were Endpoints, so I think we should probably look at EndpointSlices if present and Endpoints if not. Does that sound sane?

cmd/entrypoint/endpoint_routing.go Outdated Show resolved Hide resolved
Signed-off-by: ajaychoudhary-hotstar <[email protected]>
Signed-off-by: ajaychoudhary-hotstar <[email protected]>
Signed-off-by: ajaychoudhary-hotstar <[email protected]>
@ajaychoudhary-hotstar
Copy link
Author

@ajaychoudhary-hotstar, many thanks for diving into this! The mechanics of how you're dealing with EndpointSlices look reasonable to me, but I need to make your life a little harder, I'm afraid -- I've run into at least one case where there were no EndpointSlices but there were Endpoints, so I think we should probably look at EndpointSlices if present and Endpoints if not. Does that sound sane?

Thanks, @kflynn Have added endpoints as fallback.

Copy link
Member

@kflynn kflynn left a comment

Choose a reason for hiding this comment

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

@ajaychoudhary-hotstar, I think this looks good, many thanks! Let me sort out CI for it...

Copy link
Member

@Alice-Lilith Alice-Lilith left a comment

Choose a reason for hiding this comment

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

Nice, and thanks for the PR! 🙂 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code size:L This PR changes 100-499 lines, ignoring generated files. t:feature New feature or enhancement request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants