-
Notifications
You must be signed in to change notification settings - Fork 166
fix(nodes): nodes_log query and tailLines arguments #409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(nodes): nodes_log query and tailLines arguments #409
Conversation
Signed-off-by: Neeraj Krishna Gopalakrishna <[email protected]>
39b4f3d to
43c1762
Compare
|
/assign @manusa as you recently worked on this file |
|
cc: @blublinsky |
|
@blublinsky mind checking the PR also in the context of these comment: https://github.com/containers/kubernetes-mcp-server/blob/main/pkg/kubernetes/nodes.go#L8-L13 To reflect the correct usage pattern? |
|
This was originally implemented by @blublinsky I'd advise that @blublinsky and others who actually rely on this, chimed in and described what do they exactly need. |
|
I think it's fine as long as the capability does not change. We rely on LLM to do the right invocation, so it should not matter |
Signed-off-by: Neeraj Krishna Gopalakrishna <[email protected]>
@manusa Thanks for reviewing. The query parameter is added based on the public docs https://kubernetes.io/docs/concepts/cluster-administration/system-logs/ and I tested it to be working with Kubernetes cluster. We might need to broaden the usage itself later to use the many other options it supports. For now this is a bug fix |
|
Thanks for the test fix. LGTM @blublinsky any final review, or are we good to go with this? |
Yes, I know. I linked those in the PR I created (#399) as a follow up of the original implementation #384 The problem I find here is that the docs are nor clear since the path: does work and is what was implemented in the first place. The other problem I see is that what's stated in the docs (logFileName is part of the URL query params -not to confuse with the query parameter-): doesn't behave as expected at least with a Kind cluster. Let's proceed this way. Once it's ready, I'll let you know, and both @blublinsky and you can confirm that your use-cases are still functional. |
Signed-off-by: Marc Nuri <[email protected]>
|
@ngopalak-redhat @blublinsky I added a subsequent commit to the branch with the changes to make the tool resemble the official API exposed in the docs. Please, check if these changes work with your use-cases. It should be compatible with both your approaches. |
@manusa I have tested with my cluster and its working now: Also tested the tailLines: |
|
/lgtm |
I'm using the recently added Node log query to get Kubelet logs. It didn't work even after enabling the feature gate NodeLogQuery.
A small fix was required to using the "query" param as per the docs: https://kubernetes.io/docs/concepts/cluster-administration/system-logs/
Tested with OpenShift Cluster. Here are the test results:
** Before **
** After **
Error 413 is expected. Its a claude issue. But with this fix, MCP server should be able to fetch kubelet logs using the proxy API.