feat: watch for configuration changes

Watch kube config files for changes.
Automatically reload kubernetes client and list of tools.

Useful for logins or context changes after an MCP session has started.
This commit is contained in:
Marc Nuri
2025-03-21 18:05:41 +01:00
parent c9def7dd46
commit a98e69102c
7 changed files with 97 additions and 6 deletions

2
go.mod
View File

@@ -3,6 +3,7 @@ module github.com/manusa/kubernetes-mcp-server
go 1.23.5
require (
github.com/fsnotify/fsnotify v1.8.0
github.com/mark3labs/mcp-go v0.15.0
github.com/spf13/afero v1.14.0
github.com/spf13/cobra v1.9.1
@@ -22,7 +23,6 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect