Repository navigation
docs: add NPS Explorer example - #76
Conversation
Self-contained example showing how to deploy a DocsClaw agent that queries the National Park Service REST API. Demonstrates ConfigMap-driven personality, skills as separate ConfigMaps, and API key management via Kubernetes Secrets. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
|
Warning Review limit reached
More reviews will be available in 41 minutes and 3 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR introduces the NPS Explorer, a complete example agent for DocsClaw that answers questions about U.S. national parks. It adds Kubernetes manifests (Deployment, Service, Route), ConfigMaps for agent configuration and NPS API skill definitions, Secrets for LLM and NPS credentials, and comprehensive documentation for deploying and testing the example. ChangesNPS Explorer Example Deployment
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@examples/nps-explorer/configmap.yaml`:
- Around line 73-83: The workspace key is placed at the root but the loader
expects agentCfg.Tools.Workspace; move the workspace entry into the tools
section (so it becomes tools.workspace) in the agent-config.yaml/ configmap so
the loader (referencing agentCfg.Tools.Workspace) reads the configured path
correctly.
In `@examples/nps-explorer/deployment.yaml`:
- Line 40: Replace the mutable image tag "ghcr.io/redhat-et/docsclaw:latest"
with an immutable reference: either a fixed version tag (e.g., :vX.Y.Z) or an
image digest (sha256:...), and optionally add imagePullPolicy: IfNotPresent when
using a fixed tag (or Always when using digest) to make deployments
reproducible; update the image field in the Deployment spec (the line containing
image:) accordingly so the manifest references a specific version rather than
:latest.
- Around line 127-131: The manifest includes an OpenShift-only resource
(apiVersion: route.openshift.io/v1, kind: Route) in a file users are instructed
to kubectl apply on standard Kubernetes clusters; remove or isolate this Route
resource so applying the manifest doesn't fail: either move the Route block out
into a separate OpenShift-only file (or a kustomize/overlay) or guard it with
tooling-specific conditionals, and ensure only Kubernetes-native resources
remain in the shared deployment.yaml (locate the block by the apiVersion:
route.openshift.io/v1 / kind: Route markers).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: 469545a8-1ff0-4a22-9e28-5d79e3c30de2
📒 Files selected for processing (6)
examples/nps-explorer/README.mdexamples/nps-explorer/configmap.yamlexamples/nps-explorer/deployment.yamlexamples/nps-explorer/llm-secret.yamlexamples/nps-explorer/nps-secret.yamlexamples/nps-explorer/skill-configmap.yaml
| runAsNonRoot: true | ||
| containers: | ||
| - name: docsclaw | ||
| image: ghcr.io/redhat-et/docsclaw:latest |
There was a problem hiding this comment.
Avoid :latest for deployment images
Line 40 uses a mutable tag, which hurts reproducibility and can silently change runtime behavior.
Proposed fix
- image: ghcr.io/redhat-et/docsclaw:latest
+ image: ghcr.io/redhat-et/docsclaw:<pinned-version-or-digest>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@examples/nps-explorer/deployment.yaml` at line 40, Replace the mutable image
tag "ghcr.io/redhat-et/docsclaw:latest" with an immutable reference: either a
fixed version tag (e.g., :vX.Y.Z) or an image digest (sha256:...), and
optionally add imagePullPolicy: IfNotPresent when using a fixed tag (or Always
when using digest) to make deployments reproducible; update the image field in
the Deployment spec (the line containing image:) accordingly so the manifest
references a specific version rather than :latest.
| --- | ||
| # Route (OpenShift) — exposes the agent externally with TLS | ||
| # On plain Kubernetes, replace with an Ingress resource. | ||
| apiVersion: route.openshift.io/v1 | ||
| kind: Route |
There was a problem hiding this comment.
OpenShift Route in a shared manifest breaks Kubernetes apply
Lines 127-131 add route.openshift.io/v1 in the same file users are told to apply with kubectl; this fails on standard Kubernetes clusters.
Proposed fix
-# NPS Explorer Agent — Deployment, Service, and Route
+# NPS Explorer Agent — Deployment and Service
...
----
-# Route (OpenShift) — exposes the agent externally with TLS
-# On plain Kubernetes, replace with an Ingress resource.
-apiVersion: route.openshift.io/v1
-kind: Route
-...
+# Move Route to a separate `route.yaml` and apply it only on OpenShift.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@examples/nps-explorer/deployment.yaml` around lines 127 - 131, The manifest
includes an OpenShift-only resource (apiVersion: route.openshift.io/v1, kind:
Route) in a file users are instructed to kubectl apply on standard Kubernetes
clusters; remove or isolate this Route resource so applying the manifest doesn't
fail: either move the Route block out into a separate OpenShift-only file (or a
kustomize/overlay) or guard it with tooling-specific conditionals, and ensure
only Kubernetes-native resources remain in the shared deployment.yaml (locate
the block by the apiVersion: route.openshift.io/v1 / kind: Route markers).
Address CodeRabbit review findings: - workspace was at YAML root but the Go loader reads it from agentCfg.Tools.Workspace — moved under tools: to match - Added comment suggesting version pinning for production Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Summary
examples/nps-explorer/showing how to deploy a DocsClaw agent that queries the National Park Service REST APIFiles
README.mdconfigmap.yamlskill-configmap.yamlllm-secret.yamlnps-secret.yamldeployment.yamlTest plan
yamllintpasses on all YAML files (line-length warnings in literal blocks are expected)kubectl apply --dry-run=client -f examples/nps-explorer/succeeds🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores