Repository navigation
Adding Crossplane Toolset #1839
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
moshemorad
merged 8 commits into
HolmesGPT:master
from
mrinalpravi:feat/crossplane-toolset
Apr 21, 2026
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
55e87b4
feat: add crossplane toolset
mrinalpravi 9e8f479
feat: address review comment
mrinalpravi d80a8c0
Merge branch 'master' into feat/crossplane-toolset
mrinalpravi a8e5300
Merge branch 'master' into feat/crossplane-toolset
mrinalpravi 2bdce8f
Merge branch 'master' into feat/crossplane-toolset
mrinalpravi 8df24a8
Merge branch 'master' into feat/crossplane-toolset
mrinalpravi 8e603f0
docs: alphabetize Coralogix/Crossplane in README data sources table
mrinalpravi b2d3663
Merge branch 'master' into feat/crossplane-toolset
mrinalpravi 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,80 @@ | ||
| # Crossplane | ||
|
|
||
| By enabling this toolset, HolmesGPT will be able to troubleshoot Crossplane-managed infrastructure by inspecting providers, compositions, claims, composite resources, and managed resources across the full resource hierarchy. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Crossplane must be installed on your Kubernetes cluster. HolmesGPT uses `kubectl` to query Crossplane custom resources, so no additional CLI tools are required. | ||
|
|
||
| HolmesGPT needs read access to Crossplane CRDs. If you use Kubernetes RBAC, ensure the service account has permissions to `get` and `list` the following API groups: | ||
|
|
||
| ```yaml | ||
| # Add to your ClusterRole | ||
| - apiGroups: ["pkg.crossplane.io"] | ||
| resources: ["providers", "providerrevisions"] | ||
| verbs: ["get", "list"] | ||
| - apiGroups: ["apiextensions.crossplane.io"] | ||
| resources: ["compositeresourcedefinitions", "compositions"] | ||
| verbs: ["get", "list"] | ||
| # For managed resources, add the specific API groups used by your providers. | ||
| # Example for AWS provider: | ||
| - apiGroups: ["s3.aws.upbound.io", "rds.aws.upbound.io", "ec2.aws.upbound.io"] | ||
| resources: ["*"] | ||
| verbs: ["get", "list"] | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| === "Holmes CLI" | ||
|
|
||
| Add the following to **~/.holmes/config.yaml**: | ||
|
|
||
| ```yaml | ||
| toolsets: | ||
| crossplane/core: | ||
| enabled: true | ||
| ``` | ||
|
|
||
| --8<-- "snippets/toolset_refresh_warning.md" | ||
|
|
||
| To test, run: | ||
|
|
||
| ```bash | ||
| holmes ask "Which Crossplane managed resources are failing and why?" | ||
| ``` | ||
|
|
||
| === "Robusta Helm Chart" | ||
|
|
||
| ```yaml | ||
| holmes: | ||
| customClusterRoleRules: | ||
| - apiGroups: ["pkg.crossplane.io"] | ||
| resources: ["providers", "providerrevisions"] | ||
| verbs: ["get", "list"] | ||
| - apiGroups: ["apiextensions.crossplane.io"] | ||
| resources: ["compositeresourcedefinitions", "compositions"] | ||
| verbs: ["get", "list"] | ||
| toolsets: | ||
| crossplane/core: | ||
| enabled: true | ||
| ``` | ||
|
|
||
| --8<-- "snippets/helm_upgrade_command.md" | ||
|
|
||
| ## Common Use Cases | ||
|
|
||
| ```bash | ||
| holmes ask "Which Crossplane managed resources are failing and why?" | ||
| ``` | ||
|
|
||
| ```bash | ||
| holmes ask "Are all Crossplane providers healthy?" | ||
| ``` | ||
|
|
||
| ```bash | ||
| holmes ask "Trace the claim my-database in namespace production and find which managed resource is broken" | ||
| ``` | ||
|
|
||
| ```bash | ||
| holmes ask "Why is my S3 bucket not becoming ready?" | ||
| ``` |
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,101 @@ | ||
| toolsets: | ||
| crossplane/core: | ||
| description: "Tools for troubleshooting Crossplane managed resources, compositions, providers, and claims" | ||
| docs_url: "https://holmesgpt.dev/data-sources/builtin-toolsets/crossplane/" | ||
| icon_url: "https://raw.githubusercontent.com/crossplane/crossplane/master/docs/media/logo.svg" | ||
| llm_instructions: | | ||
| You have tools to debug Crossplane-managed infrastructure-as-code resources. | ||
| Crossplane uses a resource hierarchy: Claims -> Composite Resources (XRs) -> Managed Resources. | ||
| Providers are controllers that reconcile managed resources against cloud APIs. | ||
|
|
||
| ALWAYS follow this investigation order: | ||
| 1. Check provider health with crossplane_list_providers - a broken provider causes all its managed resources to fail | ||
| 2. If investigating a specific resource, trace its hierarchy from claim down to managed resources | ||
| 3. Check status.conditions on each resource level: | ||
| - Synced=False usually means a provider/API error (wrong credentials, quota exceeded, invalid config) | ||
| - Ready=False but Synced=True means the resource is still provisioning or waiting for a dependency | ||
| - Installed/Healthy conditions on providers indicate controller health | ||
| 4. Look at events for detailed error messages | ||
| 5. Compare spec vs status for drift detection | ||
|
|
||
| When a managed resource fails: | ||
| - First check if its provider is healthy | ||
| - Then check the ProviderConfig for credential/connectivity issues | ||
| - Then look at the managed resource's conditions and events for the specific API error | ||
|
|
||
| {% if tool_names|list|length > 0 %} | ||
| The following Crossplane tools are available: {{ ", ".join(tool_names) }} | ||
| {% endif %} | ||
|
|
||
| DO NOT tell the user to check resources manually. Investigate on their behalf using the available tools and report your findings with specific details. | ||
| tags: | ||
| - core | ||
| prerequisites: | ||
| - command: "kubectl api-resources --api-group=pkg.crossplane.io --no-headers 2>/dev/null | grep -q providers" | ||
|
|
||
| tools: | ||
| - name: "crossplane_list_providers" | ||
| description: "List all installed Crossplane providers with their health status, installed version, and package reference" | ||
| command: "kubectl get providers.pkg.crossplane.io -o wide 2>&1" | ||
|
|
||
| - name: "crossplane_get_provider" | ||
| description: "Get detailed status of a specific Crossplane provider including conditions (Installed, Healthy), revision, and package info" | ||
| command: "kubectl get providers.pkg.crossplane.io {{ provider_name }} -o yaml 2>&1" | ||
|
|
||
| - name: "crossplane_list_provider_revisions" | ||
| description: "List provider revisions to check for version rollout issues or stuck upgrades" | ||
| command: "kubectl get providerrevisions.pkg.crossplane.io -o wide 2>&1" | ||
|
|
||
| - name: "crossplane_list_provider_configs" | ||
| description: "List ProviderConfigs of a specific type to check credential configurations. The provider_config_kind should be the full CRD kind (e.g., providerconfigs.aws.upbound.io, providerconfigs.gcp.upbound.io)" | ||
| command: "kubectl get {{ provider_config_kind }} -o wide 2>&1" | ||
|
|
||
| - name: "crossplane_get_provider_config" | ||
| description: "Get detailed ProviderConfig including credential source and configuration" | ||
| command: "kubectl get {{ provider_config_kind }} {{ config_name }} -o yaml 2>&1" | ||
|
|
||
| - name: "crossplane_list_xrds" | ||
| description: "List all CompositeResourceDefinitions (XRDs) which define the schema for composite resources and claims" | ||
| command: "kubectl get compositeresourcedefinitions.apiextensions.crossplane.io -o wide 2>&1" | ||
|
|
||
| - name: "crossplane_get_xrd" | ||
| description: "Get details of a specific CompositeResourceDefinition including its schema, claim names, and offered versions" | ||
| command: "kubectl get compositeresourcedefinitions.apiextensions.crossplane.io {{ xrd_name }} -o yaml 2>&1" | ||
|
|
||
| - name: "crossplane_list_compositions" | ||
| description: "List all Compositions which define how composite resources map to managed resources" | ||
| command: "kubectl get compositions.apiextensions.crossplane.io -o wide 2>&1" | ||
|
|
||
| - name: "crossplane_get_composition" | ||
| description: "Get details of a specific Composition including its resource templates and patch sets" | ||
| command: "kubectl get compositions.apiextensions.crossplane.io {{ composition_name }} -o yaml 2>&1" | ||
|
|
||
| - name: "crossplane_get_claim" | ||
| description: "Get a Crossplane claim's full status including conditions, composite resource reference, and connection details. The claim_kind is the plural form (e.g., postgresqlinstances, buckets)" | ||
| command: "kubectl get {{ claim_kind }} {{ claim_name }} -n {{ namespace }} -o yaml 2>&1" | ||
|
|
||
| - name: "crossplane_get_composite_resource" | ||
| description: "Get a composite resource (XR) including its status, conditions, composed resource references, and connection details. The xr_kind is the plural form (e.g., xpostgresqlinstances, xbuckets)" | ||
| command: "kubectl get {{ xr_kind }} {{ xr_name }} -o yaml 2>&1" | ||
|
|
||
| - name: "crossplane_list_managed_resources" | ||
| description: "List managed resources of a specific kind with their sync and ready status. The resource_kind is the plural form (e.g., buckets.s3.aws.upbound.io, instances.rds.aws.upbound.io)" | ||
| command: "kubectl get {{ resource_kind }} -o wide 2>&1" | ||
|
|
||
| - name: "crossplane_get_managed_resource" | ||
| description: "Get full details of a specific managed resource including conditions (Synced, Ready, LastAsyncOperation), external name, and provider config reference" | ||
| script: | | ||
| #!/bin/bash | ||
| echo "=== Resource Status ===" | ||
| kubectl get {{ resource_kind }} {{ resource_name }} -o yaml 2>&1 | ||
| echo "" | ||
| echo "=== Events ===" | ||
| kubectl get events --field-selector involvedObject.name={{ resource_name }} --sort-by='.lastTimestamp' 2>&1 | ||
|
|
||
| - name: "crossplane_get_resource_events" | ||
| description: "Get Kubernetes events for a specific Crossplane resource to find error messages and status transitions" | ||
| command: "kubectl get events --field-selector involvedObject.name={{ resource_name }} --sort-by='.lastTimestamp' 2>&1" | ||
|
|
||
| - name: "crossplane_list_managed_by_composite" | ||
| description: "List all managed resources owned by a specific composite resource by label selector" | ||
| command: "kubectl get managed -l crossplane.io/composite={{ composite_name }} -o wide 2>&1" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.