-
Notifications
You must be signed in to change notification settings - Fork 189
Description
Description
In #520 I likely introduced a non-documented behavioral regression.
Before the introduced changes, the mcp.Server instance recreated the kubernetes.Provider whenever the reloadKubernetesClusterProvider callback was called.
This wasn't a straightforward implementation since the callback itself was called from the kubernetes.Provider instance.
In the method, the mcp.Server teared down the active kubernetes.Provider and recreated it.
After the introduced changes, the mcp.Server instance exposes a reloadToolsets method that is used as a callback by the kubernetes.Provider watchers (WatchTargets(reload McpReload)).
The mcp.Server no longer recreates the kubernetes.Provider instance, which is active for the entire lifecycle of the mcp.Server.
This means that if the underlying configurations for the applicable kubernetes.Manager instances managed my the kuberentes.Provider are changed, the provider itself won't be aware of these.
Same happens in case new contexts/targets are added to the configuration.