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(dataplanes): add visualization for built-in gateways #2082

Merged
merged 1 commit into from
Feb 6, 2024
Merged

feat(dataplanes): add visualization for built-in gateways #2082

merged 1 commit into from
Feb 6, 2024

Conversation

kleinfreund
Copy link
Contributor

@kleinfreund kleinfreund commented Jan 23, 2024

Handle built-in gateways in the new Dataplane detail view display.

Changes the Dataplane stats data source to expect a service parameter to account for that part being dynamic in the case of gateways and provides 'localhost_' for standard proxies as the value for this parameter. This allows us to maintain one data source definition for stats.

Resolves #2049.

Signed-off-by: Philipp Rudloff philipp.rudloff@konghq.com

@kleinfreund kleinfreund self-assigned this Jan 23, 2024
Copy link

netlify bot commented Jan 23, 2024

Deploy Preview for kuma-gui ready!

Name Link
🔨 Latest commit 693a88d
🔍 Latest deploy log https://app.netlify.com/sites/kuma-gui/deploys/65c1fc0438763c000766bf97
😎 Deploy Preview https://deploy-preview-2082--kuma-gui.netlify.app/gui
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kleinfreund kleinfreund changed the title feat(dataplanes): add dataplane visualization for built-in gateways feat(dataplanes): add visualization for built-in gateways Jan 24, 2024
Handle built-in gateways in the new Dataplane detail view display.

Changes the Dataplane stats data source to expect a `service` parameter to account for that part being dynamic in the case of gateways and provides `'localhost_'` for standard proxies as the value for this parameter. This allows us to maintain one data source definition for stats.

Signed-off-by: Philipp Rudloff <philipp.rudloff@konghq.com>
@kleinfreund kleinfreund marked this pull request as ready for review February 6, 2024 09:34
@kleinfreund kleinfreund requested a review from a team as a code owner February 6, 2024 09:34
@kleinfreund kleinfreund requested review from johncowen and removed request for a team February 6, 2024 09:34
@kleinfreund kleinfreund merged commit 1e57ad3 into kumahq:master Feb 6, 2024
16 checks passed
@kleinfreund kleinfreund deleted the feat/support-dataplane-visualization-for-built-in-gateways branch February 6, 2024 11:21
@kleinfreund kleinfreund removed their assignment Feb 6, 2024
johncowen added a commit that referenced this pull request Feb 13, 2024
Various amends for the Dataplane Gateway Viz

- Adds an `inboundName` and `inbound[].name` properties at the data layer level (see #2082 (comment))
- Fills in a single inbound for built-in gateways based on inferring the data from the tags of the gateway, again in the data layer. This is only temporary, gateways can have multiple inbounds.
- Using the above, removes the duplication/fork in `DataPlaneDetailView` for showing the Traffic components. This also has the benefit that all the empty/loading/error states work the same as the view when we are viewing a sidecar/standard dataplane.
- Replaces the hardcoded `HTTP` protocol for the current single gateway inbound with the correct protocol from the stats endpoint.
- Replaces instances of a `Cluster` 'protocol' with `tcp` for gateway outbounds. Whilst this is hardcoded to `tcp` for gateway outbounds only, I figure its better than showing `Cluster` for a protocol. Figuring out the protocol for gateway outbounds is going to be a little more involved using the `listeners` property of the `/stats` endpoint.
- I hid our filled out gateway inbounds from anywhere else we show inbounds for the moment at least, using DataCollection to do that in places, although I'm guessing that if a gateway has inbounds then we should also show them in other places (we currently don't)

All in all while we still don't show multiple inbounds if there are any, and the protocol for the outbounds could be wrong. I figured there was enough improvement here (no duplication, better states, no `Cluster` protocol etc) to PR something and continue with these issues.

Signed-off-by: John Cowen <john.cowen@konghq.com>
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.

dataplane view for builtin gateway
2 participants