Skip to content

Update argocd.md - #778

Merged
pavangudiwada merged 4 commits into
masterfrom
update-argocd-docs
Aug 11, 2025
Merged

pavangudiwada merged 4 commits into
masterfrom
update-argocd-docs

Conversation

@aantn

@aantn aantn commented Aug 4, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@aantn
aantn requested a review from pavangudiwada August 4, 2025 09:22
@coderabbitai

coderabbitai Bot commented Aug 4, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Reorganized and expanded the ArgoCD toolset docs: added Prerequisites (token generation, RBAC), split Configuration into Port Forwarding and Server URL modes, added Holmes CLI and Helm Chart usage examples, expanded capabilities list, and added security and testing notes.

Changes

Cohort / File(s) Change Summary
ArgoCD Toolset documentation
docs/data-sources/builtin-toolsets/argocd.md
Rewrote and reorganized documentation: added Prerequisites (token generation, RBAC policy with an holmesgpt read-only role), split Configuration into Port Forwarding and Server URL approaches, provided Holmes CLI and Robusta Helm Chart configuration snippets (env vars, config.yaml, Helm values), added security note about Kubernetes secrets, expanded and clarified capabilities table (added argocd_app_history, argocd_repo_list, argocd_proj_list, argocd_proj_get, argocd_cluster_list and refined existing capability descriptions).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • nherment
  • moshemorad
  • aantn
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-argocd-docs

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.
  • 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.

Support

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

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 generate unit tests to generate unit tests for 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (1)
docs/data-sources/builtin-toolsets/argocd.md (1)

12-34: Limit HolmesGPT’s Token-Generation Rights for True Read-Only Access

The current RBAC snippet still grants HolmesGPT the ability to create API tokens, which exceeds a pure “read-only” posture and may lead to least-privilege violations if copy-pasted without review. Please either mark the token-generation rule as optional or document why it’s needed.

• File: docs/data-sources/builtin-toolsets/argocd.md
• Lines: 12–34

Suggested diff:

 data:
   policy.default: role:readonly
   policy.csv: |
     p, role:admin, *, *, *, allow
     p, role:admin, accounts, apiKey, *, allow
-    p, holmesgpt, accounts, apiKey, holmesgpt, allow
+    # Optional – only include if HolmesGPT must generate its own ArgoCD API token
+    p, holmesgpt, accounts, apiKey, holmesgpt, allow
     p, holmesgpt, projects, get, *, allow
     p, holmesgpt, applications, get, *, allow
     …  
     g, admin, role:admin

Additionally, add a note above the snippet explaining why token-creation rights are required (or omit the rule for strictly read-only use).

🧹 Nitpick comments (3)
docs/data-sources/builtin-toolsets/argocd.md (3)

41-46: Indentation triggers MD046 – interpreted as an “indented code block”

The four-space indent before regular text (“Set the following…”) is parsed by Markdown as a code block, causing markdownlint failure and rendering quirks outside MkDocs-Material tab syntax.

Quick fix:

-    Set the following environment variable and the ArgoCD toolset will be automatically enabled:
+Set the following environment variable and the ArgoCD toolset will be automatically enabled:

Repeat for any non-code lines inside the tab. If you rely on the indent for tabbing, wrap the entire tab body in a fenced block (~~~) per MkDocs-Material guidance or disable MD046 locally:

<!-- markdownlint-disable-next-line MD046 -->

65-75: Same MD046 issue inside Helm Chart tab

The Helm values snippet is fenced correctly, but the surrounding explanatory text is indented four spaces, again flagged by markdownlint. Apply the same un-indent or lint-ignore pattern as above for consistency and successful CI.


43-45: Shell history leakage warning

Exporting ARGOCD_AUTH_TOKEN directly may leave the token in users’ shell history. Add a brief caution or point users to read -s / envsubst / secret-manager alternatives (you already hint at secrets for Helm). A one-liner note here improves security hygiene.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d4fedfc and f9ea48c.

📒 Files selected for processing (1)
  • docs/data-sources/builtin-toolsets/argocd.md (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: applies to holmes/plugins/toolsets/**/*.yaml : toolsets must be placed in holmes/plugins/toolsets/{n...
Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-03T07:25:36.018Z
Learning: Applies to holmes/plugins/toolsets/**/*.yaml : Toolsets must be placed in holmes/plugins/toolsets/{name}.yaml or {name}/

Applied to files:

  • docs/data-sources/builtin-toolsets/argocd.md
📚 Learning: the robusta-dev/holmesgpt codebase has comprehensive existing validation for azure environment varia...
Learnt from: nherment
PR: robusta-dev/holmesgpt#610
File: .github/workflows/llm-evaluation.yaml:39-42
Timestamp: 2025-07-08T08:45:41.069Z
Learning: The robusta-dev/holmesgpt codebase has comprehensive existing validation for Azure environment variables (AZURE_API_BASE, AZURE_API_KEY, AZURE_API_VERSION) and MODEL in tests/llm/utils/classifiers.py, tests/llm/conftest.py, and holmes/core/llm.py. Don't suggest adding redundant validation logic.

Applied to files:

  • docs/data-sources/builtin-toolsets/argocd.md
📚 Learning: when suggesting improvements to environment variable handling in robusta-dev/holmesgpt, check first ...
Learnt from: nherment
PR: robusta-dev/holmesgpt#610
File: .github/workflows/llm-evaluation.yaml:39-42
Timestamp: 2025-07-08T08:45:41.069Z
Learning: When suggesting improvements to environment variable handling in robusta-dev/holmesgpt, check first if validation logic already exists rather than reimplementing it.

Applied to files:

  • docs/data-sources/builtin-toolsets/argocd.md
🪛 markdownlint-cli2 (0.17.2)
docs/data-sources/builtin-toolsets/argocd.md

41-41: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)


65-65: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Pre-commit checks
  • GitHub Check: llm_evals
  • GitHub Check: Pre-commit checks

@github-actions

Copy link
Copy Markdown
Contributor

Results of HolmesGPT evals

  • ask_holmes: 22/43 test cases were successful, 0 regressions, 1 skipped, 20 mock failures
Test suite Test case Status
ask 01_how_many_pods ✅
ask 02_what_is_wrong_with_pod 🔧
ask 03_what_is_the_command_to_port_forward 🔧
ask 04_related_k8s_events ↪️
ask 05_image_version 🔧
ask 09_crashpod ✅
ask 10_image_pull_backoff 🔧
ask 11_init_containers ✅
ask 14_pending_resources ✅
ask 15_failed_readiness_probe 🔧
ask 17_oom_kill ✅
ask 18_crash_looping_v2 ✅
ask 19_detect_missing_app_details 🔧
ask 24_misconfigured_pvc 🔧
ask 28_permissions_error ✅
ask 29_events_from_alert_manager 🔧
ask 39_failed_toolset 🔧
ask 41_setup_argo ✅
ask 42_dns_issues_steps_new_tools 🔧
ask 43_current_datetime_from_prompt ✅
ask 45_fetch_deployment_logs_simple 🔧
ask 51_logs_summarize_errors 🔧
ask 53_logs_find_term ✅
ask 54_not_truncated_when_getting_pods 🔧
ask 59_label_based_counting ✅
ask 60_count_less_than 🔧
ask 61_exact_match_counting ✅
ask 63_fetch_error_logs_no_errors ✅
ask 77_liveness_probe_misconfiguration 🔧
ask 79_configmap_mount_issue 🔧
ask 83_secret_not_found 🔧
ask 86_configmap_like_but_secret 🔧
ask 88_affinity_like_but_taints 🔧
ask 89_runbook_missing_cloudwatch 🔧
ask 90_runbook_basic_selection 🔧
ask 93_calling_datadog ✅
ask 93_calling_datadog ✅
ask 93_calling_datadog ✅
ask 97_logs_clarification_needed 🔧
ask 100_historical_logs 🔧
ask 110_k8s_events_image_pull 🔧
ask 24a_misconfigured_pvc_basic 🔧
ask 13a_pending_node_selector_basic 🔧

Legend

  • ✅ the test was successful
  • ↪️ the test was skipped
  • ⚠️ the test failed but is known to be flaky or known to fail
  • 🔧 the test failed due to mock data issues (not a code regression)
  • ❌ the test failed and should be fixed before merging the PR

@pavangudiwada pavangudiwada left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (6)
docs/data-sources/builtin-toolsets/argocd.md (6)

39-41: Clarify connection modes and env-vars; mention ARGOCD_INSECURE as an alternative.

Consider explicitly labeling “Server URL (ARGOCD_SERVER)” and noting “ARGOCD_INSECURE=true” as an alternative to putting “--insecure” into ARGOCD_OPTS.


48-66: Fix markdownlint MD046: indented code blocks inside tabs.

mkdocs tabs require 4-space indentation, which triggers MD046. Suppress the rule locally to keep tabs rendering correctly.

+<!-- markdownlint-disable MD046 -->
 === "Holmes CLI"
 
     Set the following environment variables:
 
     ```bash
     export ARGOCD_AUTH_TOKEN="<your-argocd-token>"
     export ARGOCD_OPTS="--port-forward --port-forward-namespace <your_argocd_namespace> --server <your_server_address> --grpc-web"
     ```
 
     Then add the following to **~/.holmes/config.yaml**:
 
     ```yaml
     toolsets:
         argocd/core:
             enabled: true
     ```
 
     --8<-- "snippets/toolset_refresh_warning.md"
 
 === "Robusta Helm Chart"
@@
-    ```
+    ```
+<!-- markdownlint-enable MD046 -->

Repeat the same wrapping for the “Server URL” tabbed sections.

Also applies to: 69-86, 99-116, 124-138


69-86: Use Kubernetes Secrets in Helm values with valueFrom to avoid plaintext tokens.

You already note to prefer secrets. Provide a concrete example so users can copy-paste safely.

 holmes:
-    additionalEnvVars:
-        - name: ARGOCD_AUTH_TOKEN
-          value: "<your-argocd-token>"
-        - name: ARGOCD_OPTS
-          value: "--port-forward --port-forward-namespace <your_argocd_namespace> --server <your_server_address> --grpc-web"
+    additionalEnvVars:
+        - name: ARGOCD_AUTH_TOKEN
+          valueFrom:
+            secretKeyRef:
+              name: holmes-argocd
+              key: authToken
+        - name: ARGOCD_OPTS
+          value: "--port-forward --port-forward-namespace <your_argocd_namespace> --server <your_server_address> --grpc-web"

Document creating the secret:

kubectl create secret generic holmes-argocd -n <ns> --from-literal=authToken='<your-argocd-token>'

87-94: Offer ARGOCD_INSECURE as env-var alternative in the note.

Add: “Alternatively, set ARGOCD_INSECURE=true instead of appending --insecure to ARGOCD_OPTS.”


124-138: Secret-based Helm values for Server URL as well.

Mirror the secret-based approach here too, to keep both modes consistent.

 holmes:
-    additionalEnvVars:
-        - name: ARGOCD_AUTH_TOKEN
-          value: "<your-argocd-token>"
-        - name: ARGOCD_SERVER
-          value: "argocd.example.com"
+    additionalEnvVars:
+        - name: ARGOCD_AUTH_TOKEN
+          valueFrom:
+            secretKeyRef:
+              name: holmes-argocd
+              key: authToken
+        - name: ARGOCD_SERVER
+          value: "argocd.example.com"

39-41: Consistency: use the canonical “Argo CD” spelling.

Consider standardizing to “Argo CD” (with a space) across headings and text.

Also applies to: 95-99, 150-160

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f9ea48c and b8ce71f.

⛔ Files ignored due to path filters (1)
  • docs/assets/Holmes_ArgoCD_demo.gif is excluded by !**/*.gif
📒 Files selected for processing (1)
  • docs/data-sources/builtin-toolsets/argocd.md (2 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/data-sources/builtin-toolsets/argocd.md

[style] ~139-~139: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 2446 characters long)
Context: ...<-- "snippets/helm_upgrade_command.md" !!! note In production, always use a K...

(EN_EXCESSIVE_EXCLAMATION)

🪛 markdownlint-cli2 (0.17.2)
docs/data-sources/builtin-toolsets/argocd.md

50-50: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)


69-69: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)


89-89: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)


101-101: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)


126-126: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)


142-142: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Pre-commit checks
  • GitHub Check: llm_evals
  • GitHub Check: Pre-commit checks
🔇 Additional comments (1)
docs/data-sources/builtin-toolsets/argocd.md (1)

150-160: All documented ArgoCD tool names are correctly registered
I’ve cross-checked docs/data-sources/builtin-toolsets/argocd.md against holmes/plugins/toolsets/argocd.yaml and confirmed that each argocd_* capability listed (app_list, app_get, app_manifests, app_resources, app_diff, app_history, repo_list, proj_list, proj_get, cluster_list) exactly matches a registered tool. No discrepancies found.

Comment thread docs/data-sources/builtin-toolsets/argocd.md
@pavangudiwada
pavangudiwada merged commit 7e4c2e1 into master Aug 11, 2025
@pavangudiwada
pavangudiwada deleted the update-argocd-docs branch August 11, 2025 16:22
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.

2 participants