Skip to content

feat: Enrich AKS node health tools #531

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
merged 4 commits into from
Jun 26, 2025

Conversation

nilo19
Copy link
Contributor

@nilo19 nilo19 commented Jun 17, 2025

  • Add vmss_run_command tool for executing commands on VMSS instances
  • Add get_node_resource_group and get_api_server_public_ip tools to AKS toolset
  • Add comprehensive LLM workflow instructions for node-level troubleshooting
  • Include prerequisite discovery pattern for VMSS operations

Copy link
Contributor

coderabbitai bot commented Jun 17, 2025

Walkthrough

This update enhances the AKS node health and core toolsets by adding new tools for retrieving VM Scale Set (VMSS) names, running commands on VMSS VM instances, obtaining the node resource group, and resolving the API server public IP. It also adds the prerequisite command az account list to ensure Azure account context.

Changes

File(s) Change Summary
holmes/plugins/toolsets/aks-node-health.yaml Added prerequisite command az account list; added tools list_vmss_names (list VMSS in node resource group) and vmss_run_command (run shell commands on VMSS VM instances).
holmes/plugins/toolsets/aks.yaml Added tools get_node_resource_group (fetch node resource group for AKS cluster) and get_api_server_public_ip (resolve Kubernetes API server public IP).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AKSToolset
    participant AzureCLI
    participant Kubeconfig

    User->>AKSToolset: Start troubleshooting
    AKSToolset->>AzureCLI: az account list (prerequisite)
    AKSToolset->>AzureCLI: get_node_resource_group (for AKS cluster)
    AKSToolset->>AzureCLI: list_vmss_names (in node resource group)
    User->>AKSToolset: Provide VMSS and VM instance ID
    AKSToolset->>AzureCLI: vmss_run_command (execute shell command on VMSS VM)
    AKSToolset->>Kubeconfig: get_api_server_public_ip (resolve API server IP)
Loading

Possibly related PRs

Suggested reviewers

  • mainred

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59e3648 and 507013a.

📒 Files selected for processing (1)
  • holmes/plugins/toolsets/aks.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • holmes/plugins/toolsets/aks.yaml
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: build (3.11)
  • GitHub Check: build (3.12)
  • GitHub Check: build (3.10)
  • GitHub Check: llm_evals

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@CLAassistant
Copy link

CLAassistant commented Jun 17, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ mainred
✅ arikalon1
❌ nilo19
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (5)
holmes/plugins/toolsets/aks.yaml (2)

72-76: Ensure consistency and error handling for node RG discovery
The new get_node_resource_group tool mirrors the core RG lookup but focused on nodeResourceGroup. Consider aligning flags/output with the existing get_cluster_resource_group (e.g., include -o tsv, --only-show-errors) and adding a fallback or error if the query returns empty.


77-81: Fix typo in user_description and normalize output
The user_description reads “public AS cluster” instead of “public AKS cluster.” Also, piping dig +short may produce multiple lines; consider appending -o tsv or filtering the result to ensure a single IP is returned.

holmes/plugins/toolsets/aks-node-health.yaml (3)

7-7: Add explicit login prerequisite
az account list checks subscriptions but doesn’t guarantee you’re logged in. Consider adding az login (or documenting it) to surface authentication errors upfront.


10-42: Clean up llm_instructions and clarify dependencies
The inserted llm_instructions block is thorough, but:

  • It contains trailing spaces on blank lines (YAML-lint errors).
  • References get_cluster_resource_group which isn’t defined in this toolset (it lives in aks/core).

Remove trailing spaces, standardize indentation, and note the cross-toolset requirement or include an explicit call to the core toolset.


94-99: Quote shell command and add error flags
Wrap {{ SHELL_COMMAND }} in quotes to handle complex commands, and include --only-show-errors on the run-command invocation. E.g.:

- az vmss run-command invoke --resource-group {{ NODE_RESOURCE_GROUP }} --name {{ VMSS_NAME }} --instance-id {{ VM_ID }} --command-id RunShellScript --scripts {{ SHELL_COMMAND }}
+ az vmss run-command invoke --resource-group {{ NODE_RESOURCE_GROUP }} --name {{ VMSS_NAME }} --instance-id {{ VM_ID }} --command-id RunShellScript --scripts "{{ SHELL_COMMAND }}" --only-show-errors
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59107a7 and a2e29b0.

📒 Files selected for processing (2)
  • holmes/plugins/toolsets/aks-node-health.yaml (2 hunks)
  • holmes/plugins/toolsets/aks.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
holmes/plugins/toolsets/aks-node-health.yaml

[error] 12-12: trailing spaces

(trailing-spaces)


[error] 14-14: trailing spaces

(trailing-spaces)


[error] 17-17: trailing spaces

(trailing-spaces)


[error] 22-22: trailing spaces

(trailing-spaces)


[error] 27-27: trailing spaces

(trailing-spaces)


[error] 30-30: trailing spaces

(trailing-spaces)


[error] 34-34: trailing spaces

(trailing-spaces)


[error] 37-37: trailing spaces

(trailing-spaces)

- Add vmss_run_command tool for executing commands on VMSS instances
- Add get_node_resource_group and get_api_server_public_ip tools to AKS
toolset
- Add comprehensive LLM workflow instructions for node-level
troubleshooting
- Include prerequisite discovery pattern for VMSS operations
@nilo19 nilo19 force-pushed the feat/add-node-notready-tools branch from a2e29b0 to 59e3648 Compare June 18, 2025 06:44
mainred
mainred previously approved these changes Jun 20, 2025
Copy link
Contributor

@arikalon1 arikalon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR @nilo19

Nice work!

Left a couple of small comments

@mainred mainred enabled auto-merge (squash) June 21, 2025 04:14
arikalon1
arikalon1 previously approved these changes Jun 26, 2025
Copy link
Contributor

@arikalon1 arikalon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @nilo19
nice work!

@arikalon1 arikalon1 dismissed stale reviews from mainred and themself via 507013a June 26, 2025 17:15
@mainred mainred merged commit 3d81681 into robusta-dev:master Jun 26, 2025
5 of 9 checks passed
@nilo19 nilo19 deleted the feat/add-node-notready-tools branch June 27, 2025 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants