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

chore(kuma-cp) kds extensions #1572

Merged
merged 1 commit into from
Feb 18, 2021
Merged

chore(kuma-cp) kds extensions #1572

merged 1 commit into from
Feb 18, 2021

Conversation

jakubdyszkiewicz
Copy link
Contributor

Summary

This PR provides a way to extend KDS

Full changelog

  • Introduce KDS context so you can change which resources are synced between CPs
  • Plug a custom callback when KDS session is iniated
  • Small refactor in kumactl to reuse api server client across all clients

Documentation

  • No docs, internal changes only

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team as a code owner February 17, 2021 13:06
Copy link
Contributor

@lobkovilya lobkovilya left a comment

Choose a reason for hiding this comment

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

I really like this idea with KDS context, it's much better to see Global and Remote filters in one place

@@ -109,8 +109,11 @@ func (s *server) StreamMessage(stream mesh_proto.MultiplexService_StreamMessageS
stop := make(chan struct{})
session := NewSession(clientID, stream, stop)
defer close(stop)
if err := s.callbacks.OnSessionStarted(session); err != nil {
return err
for _, callbacks := range s.callbacks {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it makes sense to create chained callbacks? Like we have for XDS

@jakubdyszkiewicz jakubdyszkiewicz merged commit b97afc4 into master Feb 18, 2021
@jakubdyszkiewicz jakubdyszkiewicz deleted the chore/kds-extension branch February 18, 2021 10:33
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.

None yet

3 participants