Skip to content

feat(dataplanes): consider listeners when computing state#4901

Open
schogges wants to merge 3 commits intokumahq:masterfrom
schogges:fix/kuma-gui/dataplanes/incorrect_status
Open

feat(dataplanes): consider listeners when computing state#4901
schogges wants to merge 3 commits intokumahq:masterfrom
schogges:fix/kuma-gui/dataplanes/incorrect_status

Conversation

@schogges
Copy link
Copy Markdown
Contributor

@schogges schogges commented May 4, 2026

When computing the state of a DP we also have to take into account the new dataplane.networking.listeners which are being used when the DP is a zone proxy. In this case the dataplane.networking.inbound entry is absent.

I've extended the mocks and added a separate test case to cover the new dataplane.networking.listeners.

Closes #4749

@schogges schogges requested a review from a team as a code owner May 4, 2026 12:56
@schogges schogges requested a review from johncowen May 4, 2026 12:56
@netlify
Copy link
Copy Markdown

netlify Bot commented May 4, 2026

Deploy Preview for kuma-gui ready!

Name Link
🔨 Latest commit e6b7e86
🔍 Latest deploy log https://app.netlify.com/projects/kuma-gui/deploys/69fda864dd2a630008a9de1c
😎 Deploy Preview https://deploy-preview-4901--kuma-gui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@schogges schogges force-pushed the fix/kuma-gui/dataplanes/incorrect_status branch from 3e75927 to 428a3e9 Compare May 4, 2026 13:11
Signed-off-by: schogges <moritz.fleck@konghq.com>
return states.offline
case unhealthyListeners.length > 0:
// Some listeners being unhealthy means the Dataplane is partially degraded.
return states.partiallyDegraded
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We were wondering in the case of:

  • There are both inbounds and listeners (is this possible?)
  • All of the inbounds are healthy
  • All of the listeners are unhealthy

Does this mean the dataplane is offline or partially degraded?

If I'm reading the code correctly, currently this would give us offline which might not be correct if there are healthy inbounds (i.e. only "degraded")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There are both inbounds and listeners (is this possible?)

Looks like these can co-exist

https://github.com/kumahq/kuma/blob/master/docs/madr/decisions/095-mesh-scoped-zone-ingress-egress.md#example

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We agreed to treat both inbounds and listeners as conceptually the same, meaning that we leave the switch statement as is but merge the listeners to the inbounds to do the computation. Furthermore we also want to escape early in case there is no connection to the CP. In that case the wording should be Not connected to CP.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've change the wording from Not connected to CP to Disconnected from CP

schogges added 2 commits May 8, 2026 10:58
Signed-off-by: schogges <moritz.fleck@konghq.com>
Signed-off-by: schogges <moritz.fleck@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.

New DPPs with listeners are displayed as Offline in GUI

2 participants