feat(dataplanes): consider listeners when computing state#4901
feat(dataplanes): consider listeners when computing state#4901schogges wants to merge 3 commits intokumahq:masterfrom
Conversation
✅ Deploy Preview for kuma-gui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
3e75927 to
428a3e9
Compare
Signed-off-by: schogges <moritz.fleck@konghq.com>
428a3e9 to
1cfb260
Compare
| return states.offline | ||
| case unhealthyListeners.length > 0: | ||
| // Some listeners being unhealthy means the Dataplane is partially degraded. | ||
| return states.partiallyDegraded |
There was a problem hiding this comment.
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")
There was a problem hiding this comment.
There are both inbounds and listeners (is this possible?)
Looks like these can co-exist
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I've change the wording from Not connected to CP to Disconnected from CP
Signed-off-by: schogges <moritz.fleck@konghq.com>
When computing the state of a DP we also have to take into account the new
dataplane.networking.listenerswhich are being used when the DP is a zone proxy. In this case thedataplane.networking.inboundentry is absent.I've extended the mocks and added a separate test case to cover the new
dataplane.networking.listeners.Closes #4749