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

feat(inspect-api): return the list of outbounds #11556

Closed

Conversation

lobkovilya
Copy link
Contributor

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues -- Fix Inspect API /_rules to include the list of outbounds #11500
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) --
    • Don't forget ci/ labels to run additional/fewer tests
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label) --

Sorry, something went wrong.

Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
@@ -2632,6 +2637,67 @@ components:
match:
type: object
x-go-type: interface{}
ResourceIdentifier:
Copy link
Contributor

Choose a reason for hiding this comment

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

It's technically a TypedResourceIdentifier no?

@@ -981,13 +984,67 @@ func (r *resourceEndpoints) rulesForResource() restful.RouteFunction {
sort.Slice(httpMatches, func(i, j int) bool {
return httpMatches[i].Hash < httpMatches[j].Hash
})
outbounds, err := r.outboundsForDPP(request.Request.Context(), dp, meshName)
Copy link
Contributor

Choose a reason for hiding this comment

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

For MeshGateways/_rules we create a fake dpp. Do you know how this works out?

dpp *core_mesh.DataplaneResource,
meshName string,
) ([]api_common.Outbound, error) {
meshContext, err := r.meshContextBuilder.BuildIfChanged(ctx, meshName, nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we get the full MeshContext again right? That's problematic then because the whole point of the _rules endpoint is that it didn't require getting all DPPs because this didn't scale at all in global as each of this calls would be in O(#Dpp).

If we need to break this then we'd need to rework the MeshContextBuillder to make this more workable, in which case we should punt this to 2.10.x

@michaelbeaumont michaelbeaumont changed the title feat(inpsect-api): return the list of outbounds feat(inspect-api): return the list of outbounds Sep 25, 2024
@lobkovilya lobkovilya closed this Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inspect API /_rules to include the list of outbounds
2 participants