Skip to content

Provider watchers to update underlying manager #522

@manusa

Description

@manusa

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions