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

Inspect API /_rules to include the list of outbounds #11500

Open
lobkovilya opened this issue Sep 20, 2024 · 4 comments
Open

Inspect API /_rules to include the list of outbounds #11500

lobkovilya opened this issue Sep 20, 2024 · 4 comments
Assignees
Labels
kind/feature New feature triage/accepted The issue was reviewed and is complete enough to start working on it
Milestone

Comments

@lobkovilya
Copy link
Contributor

Description

Kuma GUI needs to create cross links to MS, MES, MMZS even when there are no specific rules for them.

We need to include the list of outbounds, like:

outbounds:
- name: demo-app-2955c88v9z48dww6.kuma-demo # core name
  envoy: default_demo-app_kuma-demo_west_msvc_5000
  resourceIdentifier:
    type: MeshService
    mesh: default
    displayName: demo-app
    namespace: kuma-demo
    zone: west
    sectionName: "5000"

and change toResourceRules[].resourceMeta to resourceIdentifier:

toResourceRules:
  - conf: {...}
    origins: [...]
    resourceIdentifier:
      type: MeshService
      mesh: default
      displayName: demo-app
      namespace: kuma-demo
      zone: west
      sectionName: "5000"

Matching between item in outbounds and item in toResourceRules should be done by using the resourceIdentifier.

The only place where we have name with hash is outbounds[].name and it only should be used for creating cross links (until Kuma API gets endpoints that accept resourceIdentifier).

@lobkovilya lobkovilya added triage/pending This issue will be looked at on the next triage meeting kind/feature New feature labels Sep 20, 2024
@lobkovilya lobkovilya added this to the 2.9.x milestone Sep 20, 2024
@lobkovilya lobkovilya self-assigned this Sep 20, 2024
@lahabana
Copy link
Contributor

I like this! Couple of points:

  1. What happens when one of the field is empty (.e.g: zone)?
  2. If we put outbounds should we put inbounds too?

Does this only exist in the _rules api or it's part of a datastructure that's more internal and that we could use in the XDS config generation?

@lahabana
Copy link
Contributor

I'm curious also if we could add in the future internal and external inbounds/outbounds

@lobkovilya
Copy link
Contributor Author

What happens when one of the field is empty (.e.g: zone)?

Empty fields in ResourceIdentifier are meaningful, i.e. resources from global will have their zone empty, resources from universal will have their namespace empty.

If we put outbounds should we put inbounds too?

Yeah, I don't see why not, it's basically exactly the same format as outbounds, being able to make cross links to inbound's MeshService is useful as well.

Does this only exist in the _rules api or it's part of a datastructure that's more internal and that we could use in the XDS config generation?

We already have a list of outbounds in the Proxy struct, but we don't call dataplane_proxy_builder.go for _rules at this moment. Though we do it in other Inspect API endpoints.

I'm curious also if we could add in the future internal and external inbounds/outbounds

by internal you mean like envoy admin or prometheus listeners or what exactly?

@jakubdyszkiewicz jakubdyszkiewicz added triage/accepted The issue was reviewed and is complete enough to start working on it and removed triage/pending This issue will be looked at on the next triage meeting labels Sep 23, 2024
@johncowen
Copy link
Contributor

I'm guessing that if I have a list/map of outbounds (and in the future inbounds), then I no longer need to parse the envoy stats for the names of things. I can just look up the stats/values I need based on this list instead? Also means I don't need to filter out internal inbounds/outbounds etc etc.

We can obvs make any changes related to that ^ after 2.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature triage/accepted The issue was reviewed and is complete enough to start working on it
Projects
None yet
Development

No branches or pull requests

4 participants