Commit Graph

21 Commits

Author SHA1 Message Date
Marc Nuri
cad863ff22 fix(migration): rebranded from manusa/kubernetes-mcp-server to containers/kubernetes-mcp-server (#202)
Signed-off-by: Marc Nuri <marc@marcnuri.com>
2025-07-25 09:53:04 +02:00
Marc Nuri
af2a8cd19d feat(config): deny resources by using RESTMapper as an interceptor (149)
feat(config): deny resources by using RESTMapper as an interceptor

This approach ensures that resources in the deny list are **always**
processed regardless of the implementation.

The RESTMapper takes care of verifying that the requested Group Version Kind
complies with the deny list while checking for the REST endpoint.
---
feat(config): provide a limited clientset which check access
---
review: addressed PR comments
---
feat(config): provide a limited metrics clientset to check access
---
review: addressed PR comments regarding pods_exec
2025-07-01 14:44:22 +02:00
Marc Nuri
f138b06ba8 refactor(kubernetes): force usage of Derived kubernetes (125)
refactor(kubernetes): force usage of Derived kubernetes

Prevents consumers of the kubernetes package the usage of
public methods on a non-derived config instance.
---
review(kubernetes): force usage of Derived kubernetes

Addresses comment by ardaguclu
2025-06-18 06:46:05 +02:00
Marc Nuri
1a4605dc2d feat(pods): pods_top retrieves Pod resource consumption (metrics API) (119)
feat(pods): pods_top retrieves Pod resource consumption (metrics API)
---
doc(pods): pods_top retrieves Pod resource consumption (metrics API)
2025-06-16 12:07:36 +02:00
Marc Nuri
7e10e82a3a feat(output): table output to minimize resource list verbosity
A new configuration options is available: `--list-output`

There are two modes available:
 - `yaml`: current default (will be changed in subsequent PR), which returns a multi-document YAML
 - `table`: returns a plain-text table as created by the kube-api server when requested with
   `Accept: application/json;as=Table;v=v1;g=meta.k8s.io`

Additional logic has been added to the table format to include the apiVersion and kind.
This is not returned by the server, kubectl doesn't include this either.
However, this is extremely handy for the LLM when using the generic resource tools.
2025-06-12 13:26:40 +02:00
Marc Nuri
155fe6847f feat(output): configurable output architecture 2025-06-11 12:13:23 +02:00
Eran Cohen
2994699504 feat: add label selectors to listing tools
This PR introduces the ability to filter Kubernetes resources by label using a labelSelector parameter for the following tools:

 * pods_list
 * pods_list_in_namespace
 * resources_list

This enhancement allows users to retrieve a more specific set of resources based on their labels, improving the flexibility and utility of these tools.

The labelSelector parameter accepts standard Kubernetes label selector syntax, such as app=myapp,env=prod or app in (myapp,yourapp).

Signed-off-by: Eran Cohen <eranco@redhat.com>
2025-05-20 16:34:53 +02:00
Marc Nuri
b4928f8230 refactor(helm): adapt Helm contribution to project structure 2025-05-10 07:04:30 +02:00
Marc Nuri
37d7175cd6 feat(pods): pods_exec supports specifying container
Allows to specify the container where the command will be executed.
Additionally, prevents the command from failing in pods with multiple
containers when the container is not specified (defaults to first).
2025-04-26 07:02:26 +02:00
Marc Nuri
fa5bb81fe5 feat(kubernetes): added --kubeconfig flag option 2025-04-19 10:01:41 +02:00
Karel Suta
ec82de1712 feat: add optional container parameter for pods_log tool 2025-04-11 13:39:18 +02:00
Marc Nuri
cbf0299e97 test: pods_exec tests executed from mcp client 2025-03-30 19:25:31 +02:00
Marc Nuri
61289cf1df test: initial approach to pods_exec 2025-03-30 10:03:50 +02:00
Marc Nuri
d5cacb9527 feat: pods_exec minimal implementation 2025-03-28 10:49:21 +01:00
Marc Nuri
d3754585ec feat(kubernetes): reusable Kubernetes clients
Improve cache performance
2025-02-20 06:33:42 +01:00
Marc Nuri
40ff50e04d feat(kubernetes): pods_delete deletes managed resources 2025-02-19 16:20:50 +01:00
Marc Nuri
e6ab757915 feat(kubernetes): pods_run creates OpenShift routes 2025-02-18 05:34:27 +01:00
Marc Nuri
5be9852fb7 feat(kubernetes): pods_run can get any resource in the cluster 2025-02-17 15:15:05 +01:00
Marc Nuri
3bf7a0fd63 feat(kubernetes): pods_log for explicit or nil namespace 2025-02-17 09:16:28 +01:00
Marc Nuri
f591e2b06b feat(kubernetes): pods_get for explicit or nil namespace 2025-02-17 08:52:22 +01:00
Marc Nuri
80488ef6ee feat(resources): initial support for resource listing 2025-02-13 16:06:06 +01:00