Repository navigation
feat: Add kubevela to built-in toolsets #1512
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
Merged
arikalon1
merged 10 commits into
HolmesGPT:master
from
mailprak:feature/kubevela-tool-integration
Feb 14, 2026
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
697f9cf
feat: integrates kubevela toolset
mailprak 21343f9
feat: refactor the tests 212
mailprak 1327b64
feat: refactor the tests 212 to remove not required fields
mailprak ff0b780
feat: refactor commands for kubevela tool
mailprak 189c59a
feat: refactor kubevela command to be non interactive and add correct…
mailprak ee7ccbf
Merge branch 'master' into feature/kubevela-tool-integration
arikalon1 d3ce24e
Delete Robusta Helm Chart section from kubevela.md
arikalon1 a3c6e00
feat: add description for kubevela toolset
mailprak b2af7fe
feat: kubevela document update to resolve linting error
mailprak 31e6d10
Merge branch 'master' into feature/kubevela-tool-integration
arikalon1 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
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,55 @@ | ||
| # KubeVela | ||
|
|
||
| By enabling this toolset, HolmesGPT will be able to diagnose KubeVela applications, inspect components, check workflow execution, and analyze deployment issues using the Open Application Model (OAM). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| The KubeVela CLI (`vela`) must be installed and configured to access your cluster. | ||
|
|
||
| **Installation:** | ||
|
|
||
| ```bash | ||
| # Install vela CLI | ||
| curl -fsSl https://kubevela.io/script/install.sh | bash | ||
|
|
||
| # Verify installation | ||
| vela version | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| === "Holmes CLI" | ||
|
|
||
| Add the following to **~/.holmes/config.yaml**: | ||
|
|
||
| ```yaml | ||
| toolsets: | ||
| kubevela/core: | ||
| enabled: true | ||
| ``` | ||
|
mailprak marked this conversation as resolved.
Resolved
|
||
|
|
||
| --8<-- "snippets/toolset_refresh_warning.md" | ||
|
|
||
| To test, run: | ||
|
|
||
| ```bash | ||
| holmes ask "What is the status of my KubeVela applications?" | ||
| ``` | ||
|
|
||
| ## Common Use Cases | ||
|
|
||
| ```bash | ||
| holmes ask "What KubeVela applications are unhealthy and why?" | ||
| ``` | ||
|
|
||
| ```bash | ||
| holmes ask "Show me the workflow status for my payment-service application" | ||
| ``` | ||
|
|
||
| ```bash | ||
| holmes ask "What components does my frontend application have and are they running correctly?" | ||
| ``` | ||
|
|
||
| ```bash | ||
| holmes ask "Check if there are any trait configuration issues in the user-api application" | ||
| ``` | ||
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,98 @@ | ||
| toolsets: | ||
| kubevela/core: | ||
| description: "Set of tools to inspect KubeVela applications, components, and workflows" | ||
| docs_url: "https://holmesgpt.dev/data-sources/builtin-toolsets/kubevela/" | ||
| icon_url: "https://kubevela.io/img/logo.svg" | ||
| llm_instructions: | | ||
| You have access to a set of KubeVela tools for debugging cloud-native application deployments. | ||
| KubeVela is an application delivery platform that abstracts Kubernetes complexity using the Open Application Model (OAM). | ||
|
|
||
| IMPORTANT: If you are asked about application health or deployment issues, ALWAYS check: | ||
| 1. The application status and health | ||
| 2. Component statuses within the application | ||
| 3. Workflow execution status if the app uses workflows | ||
| 4. Trait configurations (ingress, autoscaling, etc.) | ||
|
|
||
| These tools help you investigate issues with KubeVela-managed applications in your Kubernetes clusters. | ||
| In addition to the general investigation steps, ALWAYS follow these steps: | ||
| 1. List applications to find the app in question | ||
| 2. Get detailed application status including components and traits | ||
| 3. Check workflow status if applicable | ||
| 4. Inspect component definitions to understand what resources are created | ||
| 5. Compare KubeVela application state with actual Kubernetes resources | ||
| 6. Check for misconfigurations in traits or policies | ||
|
|
||
| {% if tool_names|list|length > 0 %} | ||
| The following commands are available to introspect KubeVela: {{ ", ".join(tool_names) }} | ||
| {% endif %} | ||
|
|
||
| ALWAYS investigate the actual Kubernetes resources created by KubeVela to provide complete diagnostics. | ||
| DO NOT tell the user to check configurations without being specific - investigate on their behalf and provide actionable solutions. | ||
| tags: | ||
| - core | ||
| prerequisites: | ||
| - command: "vela version" | ||
| tools: | ||
| - name: "vela_app_list" | ||
| description: "List all KubeVela applications across namespaces or in a specific namespace" | ||
| command: "vela ls{% if namespace %} -n {{ namespace }}{% else %} -A{% endif %}" | ||
|
|
||
| - name: "vela_app_status" | ||
| description: "Get detailed status of a KubeVela application including components, traits, and health" | ||
| command: "vela status {{ app_name }} -n {{ namespace }}" | ||
|
|
||
| - name: "vela_app_show" | ||
| description: "Show the application specification and configuration" | ||
| command: "kubectl get application {{ app_name }} -n {{ namespace }} -o yaml" | ||
|
|
||
| - name: "vela_logs" | ||
| description: "Get logs from a KubeVela application or specific component" | ||
| command: "vela logs {{ app_name }} -n {{ namespace }}{% if component %} -c {{ component }}{% endif %}{% if pod %} --pod {{ pod }}{% endif %} --tail {{ tail | default(500) }} -y" | ||
|
|
||
| - name: "vela_port_forward" | ||
| description: "Check port-forward capability for debugging (informational only, doesn't create actual port-forward)" | ||
| command: "echo 'Port-forward available with: vela port-forward {{ app_name }} -n {{ namespace }}{% if port %} {{ port }}{% endif %}'" | ||
|
|
||
| - name: "vela_component_list" | ||
| description: "List available component definitions in the cluster" | ||
| command: "vela components" | ||
|
|
||
| - name: "vela_trait_list" | ||
| description: "List available trait definitions (like ingress, autoscaling, etc.)" | ||
| command: "vela traits" | ||
|
|
||
| - name: "vela_workflow_list" | ||
| description: "List workflow definitions available in the cluster" | ||
| command: "vela workflow list" | ||
|
|
||
| - name: "vela_workflow_status" | ||
| description: "Get the status of a workflow execution for an application" | ||
| command: "vela workflow status {{ app_name }} -n {{ namespace }}" | ||
|
|
||
| - name: "vela_workflow_logs" | ||
| description: "Get logs from a workflow execution" | ||
| command: "vela workflow logs {{ app_name }} -n {{ namespace }} --tail {{ tail | default(500) }} -y" | ||
|
|
||
| - name: "vela_addon_list" | ||
| description: "List installed KubeVela addons" | ||
| command: "vela addon list" | ||
|
|
||
| - name: "vela_addon_status" | ||
| description: "Get detailed status of a specific addon" | ||
| command: "vela addon status {{ addon_name }}" | ||
|
|
||
| - name: "vela_definition_show" | ||
| description: "Show details of a component, trait, or workflow definition" | ||
| command: "vela def get {{ definition_name }}{% if type %} --type {{ type }}{% endif %}" | ||
|
|
||
| - name: "vela_top" | ||
| description: "Show resource usage (CPU/Memory) for application pods" | ||
| command: "kubectl top pods -l app.oam.dev/name={{ app_name }} -n {{ namespace }}" | ||
|
|
||
| - name: "vela_dry_run" | ||
| description: "Preview the Kubernetes resources that would be created by an application spec" | ||
| command: "vela dry-run -f {{ file_path }}" | ||
|
|
||
| - name: "vela_live_diff" | ||
| description: "Show difference between local spec and running application" | ||
| command: "vela live-diff -f {{ file_path }} -n {{ namespace }}" |
122 changes: 122 additions & 0 deletions
122
tests/llm/fixtures/test_ask_holmes/212_kubevela_app_diagnosis/test_case.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,122 @@ | ||
| # Test that Holmes can diagnose KubeVela application deployment issues | ||
| user_prompt: "My payment-service application in the app-212 namespace is not working properly. What's wrong with it and what components does it have?" | ||
|
|
||
| expected_output: | ||
| - "Must identify that the payment-service application exists" | ||
| - "Must report that the application has an 'Unhealthy' or failed status" | ||
| - "Must mention the webservice component" | ||
| - "Must identify the issue with the container image (using nonexistent-image tag)" | ||
|
|
||
| tags: | ||
| - question-answer | ||
| - kubernetes | ||
|
|
||
| include_tool_calls: true | ||
|
|
||
| before_test: | | ||
| set -e | ||
|
|
||
| NAMESPACE="app-212" | ||
| APP_NAME="payment-service" | ||
|
|
||
| echo "Creating namespace $NAMESPACE..." | ||
| kubectl create namespace $NAMESPACE || true | ||
|
|
||
| echo "" | ||
| echo "Installing KubeVela core..." | ||
| # Check if vela-system namespace exists | ||
| if ! kubectl get namespace vela-system >/dev/null 2>&1; then | ||
| echo "Installing KubeVela..." | ||
| vela install --version v1.10.4 | ||
| else | ||
| echo "KubeVela already installed" | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "Waiting for KubeVela controller to be ready..." | ||
| kubectl wait --for=condition=available --timeout=120s deployment/vela-core -n vela-system | ||
|
|
||
| echo "" | ||
| echo "Creating a KubeVela application with an issue..." | ||
| cat <<EOF | kubectl apply -f - | ||
| apiVersion: core.oam.dev/v1beta1 | ||
| kind: Application | ||
| metadata: | ||
| name: $APP_NAME | ||
| namespace: $NAMESPACE | ||
| spec: | ||
| components: | ||
| - name: webservice | ||
| type: webservice | ||
| properties: | ||
| image: nginx:nonexistent-image # Intentionally broken image tag | ||
| ports: | ||
| - port: 80 | ||
| expose: true | ||
| cpu: "0.1" | ||
| memory: "128Mi" | ||
| traits: | ||
| - type: scaler | ||
| properties: | ||
| replicas: 1 | ||
| EOF | ||
|
|
||
| echo "" | ||
| echo "Waiting for application to be processed..." | ||
| sleep 10 | ||
|
|
||
| echo "" | ||
| echo "Checking application status..." | ||
| APP_CREATED=false | ||
| for i in {1..30}; do | ||
| if kubectl get application $APP_NAME -n $NAMESPACE >/dev/null 2>&1; then | ||
| echo "Application resource created" | ||
| APP_CREATED=true | ||
| break | ||
| fi | ||
| echo "Attempt $i/30: Waiting for application to be created..." | ||
| sleep 2 | ||
| done | ||
|
|
||
| if [ "$APP_CREATED" = false ]; then | ||
| echo "Application failed to be created after 60 seconds" | ||
| echo "" | ||
| echo "=== KubeVela controller logs (last 50 lines) ===" | ||
| kubectl logs -n vela-system -l app.kubernetes.io/name=vela-core --tail=50 || echo "No controller logs found" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "Verifying application is accessible via vela CLI..." | ||
| VELA_APP_VISIBLE=false | ||
| for i in {1..30}; do | ||
| if vela ls -n $NAMESPACE 2>&1 | grep -q "$APP_NAME"; then | ||
| echo "Application visible via vela CLI" | ||
| VELA_APP_VISIBLE=true | ||
| break | ||
| fi | ||
| echo "Attempt $i/30: Waiting for app to be visible in vela ls..." | ||
| sleep 2 | ||
| done | ||
|
|
||
| if [ "$VELA_APP_VISIBLE" = false ]; then | ||
| echo "Application not visible in vela ls after 60 seconds" | ||
| echo "" | ||
| echo "=== Application status ===" | ||
| kubectl get application $APP_NAME -n $NAMESPACE -o yaml || true | ||
| echo "" | ||
| echo "=== vela ls output ===" | ||
| vela ls -n $NAMESPACE || true | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "Application status:" | ||
| vela status $APP_NAME -n $NAMESPACE || true | ||
|
|
||
| echo "" | ||
| echo "Test setup completed - application deployed with intentional issue" | ||
|
|
||
| after_test: | | ||
| kubectl delete application payment-service -n app-212 || true | ||
| kubectl delete namespace app-212 || true |
5 changes: 5 additions & 0 deletions
5
tests/llm/fixtures/test_ask_holmes/212_kubevela_app_diagnosis/toolsets.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,5 @@ | ||
| toolsets: | ||
| kubevela/core: | ||
| enabled: true | ||
| kubernetes/core: | ||
| enabled: true |
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.
Uh oh!
There was an error while loading. Please reload this page.