osm icon indicating copy to clipboard operation
osm copied to clipboard

Listen to single pod updates in the ADS Server's `watchForUpdates` method

Open steeling opened this issue 2 years ago • 4 comments

All code refers to code after https://github.com/openservicemesh/osm/pull/4963 is submitted

Right now the watchForUpdates only listens to the ProxyUpdate topic on pubsub. We'll need to add topics to the certmanager's Rotation pubsub, GetProxyUpdatePubSub, that are still on a single channel, but where the message allows us to derive the pod that needs to be updated.

ie, in certmanager we have m.pubsub.Pub(newCert, prefix) where we have the certtype available, we can add info around the key, which will be the identity, which tells us to update all proxies with that identity.

m.pubsub.Pub(newCert, prefix, 'specific-pods-topic')

Similarly for the single pod update in broker.go

steeling avatar Aug 04 '22 22:08 steeling

part of #2683

steeling avatar Aug 04 '22 22:08 steeling

@allenlsy

steeling avatar Aug 04 '22 22:08 steeling

In the current xDS server implementation, the proxy subscribes to the cert rotation event here, without specific-pods-topic. The topic used is the service identity string. Can we just do the similar, subscribe to the cert rotation with just service identity? This should happen in the OnStreamOpen() of cache_stream.go

allenlsy avatar Aug 08 '22 20:08 allenlsy

I think it's much simpler to reason about if we have a single location for dispatching proxy events. We can publish on multiple topics simultaneously, so we should be able to get it working on the single topic without breaking the prior xDS server implementation

steeling avatar Aug 08 '22 21:08 steeling

Added default label size/needed. Please consider re-labeling this issue appropriately.

github-actions[bot] avatar Sep 08 '22 00:09 github-actions[bot]

Added default label kind/needed. Please consider re-labeling this issue appropriately.

github-actions[bot] avatar Sep 08 '22 00:09 github-actions[bot]