forked from containers/kubernetes-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 56
CORENET-7134: Add ovn-kubernetes toolset skeleton #315
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
Open
mattedallo
wants to merge
4
commits into
openshift:main
Choose a base branch
from
mattedallo:corenet-7134-ovnk-toolset
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c0c78a8
Add ovn-kubernetes toolset skeleton (CORENET-7134)
mattedallo 79dc4b4
vendor: add ovn-kubernetes-mcp v0.0.0-20260610070028-cd85fc83f533
mattedallo 8a715ad
evals: add OVN-Kubernetes toolset evaluation tasks
arghosh93 be7a463
ovn-kubernetes: add OVN tools with explicit per-tool definitions
mattedallo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,3 +36,13 @@ config: | |
| toolPattern: ".*" | ||
| minToolCalls: 1 | ||
| maxToolCalls: 20 | ||
| # OVN-Kubernetes tasks | ||
| - glob: ../tasks/ovn-kubernetes/*/*.yaml | ||
| labelSelector: | ||
| suite: ovn-kubernetes | ||
| assertions: | ||
| toolsUsed: | ||
| - server: kubernetes | ||
| toolPattern: ".*" | ||
| minToolCalls: 1 | ||
| maxToolCalls: 20 | ||
|
Comment on lines
+39
to
+48
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,3 +102,13 @@ config: | |
| toolPattern: ".*" | ||
| minToolCalls: 1 | ||
| maxToolCalls: 20 | ||
| # OVN-Kubernetes tasks | ||
| - glob: ../tasks/ovn-kubernetes/*/*.yaml | ||
| labelSelector: | ||
| suite: ovn-kubernetes | ||
| assertions: | ||
| toolsUsed: | ||
| - server: kubernetes | ||
| toolPattern: ".*" | ||
| minToolCalls: 1 | ||
| maxToolCalls: 20 | ||
|
Comment on lines
+105
to
+114
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
27 changes: 27 additions & 0 deletions
27
evals/tasks/ovn-kubernetes/ovn-get/ovn-get-list-logical-routers.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| kind: Task | ||
| apiVersion: mcpchecker/v1alpha2 | ||
| metadata: | ||
| name: "ovn-get-list-logical-routers" | ||
| difficulty: easy | ||
| category: "OVN Database Query" | ||
| description: "List all Logical_Router records from OVN Northbound database" | ||
| labels: | ||
| suite: ovn-kubernetes | ||
| requires: ovn-kubernetes | ||
| spec: | ||
| limits: | ||
| timeout: "5m" | ||
| setup: | ||
| - script: | ||
| file: ./setup.sh | ||
| prompt: | ||
| inline: | | ||
| List all Logical_Router records from the OVN Northbound database. | ||
| verify: | ||
| - llmJudge: | ||
| contains: "Shows all the Logical_Router records from the OVN Northbound database. Should include a distributed router handling inter-node routing and a local gateway router handling external connectivity" | ||
| reasoning: "Output should show all Logical_Router records including distributed router and gateway router" | ||
| assertions: | ||
| toolsUsed: | ||
| - server: kubernetes | ||
| toolPattern: "ovn_get" |
28 changes: 28 additions & 0 deletions
28
evals/tasks/ovn-kubernetes/ovn-get/ovn-get-pattern-with-columns.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| kind: Task | ||
| apiVersion: mcpchecker/v1alpha2 | ||
| metadata: | ||
| name: "ovn-get-pattern-with-columns" | ||
| difficulty: medium | ||
| category: "OVN Database Query" | ||
| description: "Filter records with pattern and show specific columns" | ||
| labels: | ||
| suite: ovn-kubernetes | ||
| requires: ovn-kubernetes | ||
| spec: | ||
| limits: | ||
| timeout: "5m" | ||
| setup: | ||
| - script: | ||
| file: ./setup.sh | ||
| prompt: | ||
| inline: | | ||
| From the Logical_Router table in the OVN Northbound database, show me only the name and nat | ||
| columns for entries matching the pattern "GR_". | ||
| verify: | ||
| - llmJudge: | ||
| contains: "Shows Logical_Router entry matching the pattern \"GR_\" with name and nat columns." | ||
| reasoning: "Output should show Logical_Router entries matching pattern GR_ with name and nat columns" | ||
| assertions: | ||
| toolsUsed: | ||
| - server: kubernetes | ||
| toolPattern: "ovn_get" |
27 changes: 27 additions & 0 deletions
27
evals/tasks/ovn-kubernetes/ovn-get/ovn-get-southbound-chassis.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| kind: Task | ||
| apiVersion: mcpchecker/v1alpha2 | ||
| metadata: | ||
| name: "ovn-get-southbound-chassis" | ||
| difficulty: easy | ||
| category: "OVN Database Query" | ||
| description: "Query Chassis table from OVN Southbound database" | ||
| labels: | ||
| suite: ovn-kubernetes | ||
| requires: ovn-kubernetes | ||
| spec: | ||
| limits: | ||
| timeout: "5m" | ||
| setup: | ||
| - script: | ||
| file: ./setup.sh | ||
| prompt: | ||
| inline: | | ||
| Show me all Chassis records from the OVN Southbound database. | ||
| verify: | ||
| - llmJudge: | ||
| contains: "Shows Chassis records corresponding to all cluster nodes from the OVN Southbound database. Indicates whether a chassis is local or remote" | ||
| reasoning: "Output should show Chassis records for all cluster nodes with local/remote indication" | ||
| assertions: | ||
| toolsUsed: | ||
| - server: kubernetes | ||
| toolPattern: "ovn_get" |
27 changes: 27 additions & 0 deletions
27
evals/tasks/ovn-kubernetes/ovn-get/ovn-get-specific-router.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| kind: Task | ||
| apiVersion: mcpchecker/v1alpha2 | ||
| metadata: | ||
| name: "ovn-get-specific-router" | ||
| difficulty: easy | ||
| category: "OVN Database Query" | ||
| description: "Get ovn_cluster_router record from Logical_Router table" | ||
| labels: | ||
| suite: ovn-kubernetes | ||
| requires: ovn-kubernetes | ||
| spec: | ||
| limits: | ||
| timeout: "5m" | ||
| setup: | ||
| - script: | ||
| file: ./setup.sh | ||
| prompt: | ||
| inline: | | ||
| Get the ovn_cluster_router record from the Logical_Router table in the OVN Northbound database. | ||
| verify: | ||
| - llmJudge: | ||
| contains: "Shows ovn_cluster_router record from the Logical_Router table. Should include list of ports, routing policies and static routes configured for the cluster router(k8s-cluster-router)" | ||
| reasoning: "Output should show ovn_cluster_router record with ports, routing policies, and static routes" | ||
| assertions: | ||
| toolsUsed: | ||
| - server: kubernetes | ||
| toolPattern: "ovn_get" |
27 changes: 27 additions & 0 deletions
27
evals/tasks/ovn-kubernetes/ovn-get/ovn-get-switch-with-columns.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| kind: Task | ||
| apiVersion: mcpchecker/v1alpha2 | ||
| metadata: | ||
| name: "ovn-get-switch-with-columns" | ||
| difficulty: medium | ||
| category: "OVN Database Query" | ||
| description: "Get specific columns from Logical_Switch table" | ||
| labels: | ||
| suite: ovn-kubernetes | ||
| requires: ovn-kubernetes | ||
| spec: | ||
| limits: | ||
| timeout: "5m" | ||
| setup: | ||
| - script: | ||
| file: ./setup.sh | ||
| prompt: | ||
| inline: | | ||
| From the Logical_Switch table in the OVN Northbound database, show me only the name and ports columns. | ||
| verify: | ||
| - llmJudge: | ||
| contains: "Shows Logical_Switch table in the OVN Northbound database showing only the name and ports columns indicating switches with their associated ports. Should contain join, transit and node specific switches in the list" | ||
| reasoning: "Output should show Logical_Switch entries with name and ports columns including join, transit, and node specific switches" | ||
| assertions: | ||
| toolsUsed: | ||
| - server: kubernetes | ||
| toolPattern: "ovn_get" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| kubectl get pods -n openshift-ovn-kubernetes -l app=ovnkube-node --field-selector=status.phase=Running -o name | grep -q . || { | ||
| echo "ERROR: No running ovnkube-node pods found" | ||
| exit 1 | ||
| } |
30 changes: 30 additions & 0 deletions
30
evals/tasks/ovn-kubernetes/ovn-lflow-list/ovn-lflow-list-datapath-with-pattern.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| kind: Task | ||
| apiVersion: mcpchecker/v1alpha2 | ||
| metadata: | ||
| name: "ovn-lflow-list-datapath-with-pattern" | ||
| difficulty: medium | ||
| category: "OVN Logical Flows" | ||
| description: "List flows for specific datapath with pattern filter" | ||
| labels: | ||
| suite: ovn-kubernetes | ||
| requires: ovn-kubernetes | ||
| spec: | ||
| limits: | ||
| timeout: "5m" | ||
| setup: | ||
| - script: | ||
| file: ./setup.sh | ||
| prompt: | ||
| inline: | | ||
| From the ovn_cluster_router datapath, show me logical flows from the routing table. | ||
| verify: | ||
| - llmJudge: | ||
| contains: "Shows logical flows equivalent to routes in routing table for the ovn_cluster_router datapath" | ||
| reasoning: "Output should show logical flows representing the routing table for ovn_cluster_router" | ||
| - llmJudge: | ||
| contains: "Comprised of routing information from ovn_cluster_router to other switches" | ||
| reasoning: "Output should describe routing information between ovn_cluster_router and connected switches" | ||
| assertions: | ||
| toolsUsed: | ||
| - server: kubernetes | ||
| toolPattern: "ovn_lflow_list" |
27 changes: 27 additions & 0 deletions
27
evals/tasks/ovn-kubernetes/ovn-lflow-list/ovn-lflow-list-for-datapath.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| kind: Task | ||
| apiVersion: mcpchecker/v1alpha2 | ||
| metadata: | ||
| name: "ovn-lflow-list-for-datapath" | ||
| difficulty: medium | ||
| category: "OVN Logical Flows" | ||
| description: "List logical flows for a specific datapath" | ||
| labels: | ||
| suite: ovn-kubernetes | ||
| requires: ovn-kubernetes | ||
| spec: | ||
| limits: | ||
| timeout: "5m" | ||
| setup: | ||
| - script: | ||
| file: ./setup.sh | ||
| prompt: | ||
| inline: | | ||
| List logical flows for the join datapath from the OVN Southbound database. | ||
| verify: | ||
| - llmJudge: | ||
| contains: "Shows data from OVN Southbound database. Contains logical flows from both ingress and egress pipeline for the join datapath" | ||
| reasoning: "Output should show logical flows from both ingress and egress pipelines for the join datapath" | ||
| assertions: | ||
| toolsUsed: | ||
| - server: kubernetes | ||
| toolPattern: "ovn_lflow_list" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| kubectl get pods -n openshift-ovn-kubernetes -l app=ovnkube-node --field-selector=status.phase=Running -o name | grep -q . || { | ||
| echo "ERROR: No running ovnkube-node pods found" | ||
| exit 1 | ||
| } |
30 changes: 30 additions & 0 deletions
30
evals/tasks/ovn-kubernetes/ovn-show/ovn-show-northbound.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| kind: Task | ||
| apiVersion: mcpchecker/v1alpha2 | ||
| metadata: | ||
| name: "ovn-show-northbound" | ||
| difficulty: easy | ||
| category: "OVN Configuration" | ||
| description: "Display OVN Northbound database configuration using ovn_show tool" | ||
| labels: | ||
| suite: ovn-kubernetes | ||
| requires: ovn-kubernetes | ||
| spec: | ||
| limits: | ||
| timeout: "5m" | ||
| setup: | ||
| - script: | ||
| file: ./setup.sh | ||
| prompt: | ||
| inline: | | ||
| Show me the OVN Northbound database configuration from one of the ovnkube-node pods. show me last 1000 lines. | ||
| verify: | ||
| - llmJudge: | ||
| contains: "Shows logical topology comprised of node specific switches, join switch, transit switch, gateway router and ovn_cluster_router" | ||
| reasoning: "Output should describe the logical topology including switches and routers" | ||
| - llmJudge: | ||
| contains: "Includes logical router ports, logical switch ports, IP address, MAC address of ports and SNAT rules" | ||
| reasoning: "Output should include details about ports, addresses, and SNAT rules" | ||
| assertions: | ||
| toolsUsed: | ||
| - server: kubernetes | ||
| toolPattern: "ovn_show" |
30 changes: 30 additions & 0 deletions
30
evals/tasks/ovn-kubernetes/ovn-show/ovn-show-southbound.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| kind: Task | ||
| apiVersion: mcpchecker/v1alpha2 | ||
| metadata: | ||
| name: "ovn-show-southbound" | ||
| difficulty: easy | ||
| category: "OVN Configuration" | ||
| description: "Display OVN Southbound database configuration using ovn_show tool" | ||
| labels: | ||
| suite: ovn-kubernetes | ||
| requires: ovn-kubernetes | ||
| spec: | ||
| limits: | ||
| timeout: "5m" | ||
| setup: | ||
| - script: | ||
| file: ./setup.sh | ||
| prompt: | ||
| inline: | | ||
| Show me the OVN Southbound database configuration from one of the ovnkube-node pods. | ||
| verify: | ||
| - llmJudge: | ||
| contains: "Shows Southbound database configuration from a node comprised of chassis information and port bindings" | ||
| reasoning: "Output should describe chassis information and port bindings" | ||
| - llmJudge: | ||
| contains: "Shows a overlay network using Geneve encapsulation with all nodes participating as chassis and connected ports" | ||
| reasoning: "Output should describe the Geneve overlay network with chassis and ports" | ||
| assertions: | ||
| toolsUsed: | ||
| - server: kubernetes | ||
| toolPattern: "ovn_show" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| kubectl get pods -n openshift-ovn-kubernetes -l app=ovnkube-node --field-selector=status.phase=Running -o name | grep -q . || { | ||
| echo "ERROR: No running ovnkube-node pods found" | ||
| exit 1 | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now should be added inside
core-eval-testingdirectory. Slack thread for reference: https://redhat-internal.slack.com/archives/C08LQ6ZVBHR/p1784225262799649?thread_ts=1784098840.558879&cid=C08LQ6ZVBHR