agentleFS
Microsoft AzureKnown publisherAzure/ARO-HCP/AGENTS.md

ARO-HCP

AGENTS.md42 starsChanged 10 days agoApache-2.0View on GitHub

Load all of CLAUDE.md for context For all image bump related tasks, see tooling/image-updater/AGENTS.md. For shared version bumps via tooling/component-updater (Istio mesh revision today; AKS/Grafana later), see tooling/component-updater/AGENTS.md. When assisting with operational troubleshooting tasks (stuck clusters, deletion issues, resource cleanup), the following context is essential. The deletion chain flows top-down through these layers. Deleting resources at a lower layer without removing the source above will cause them to be recreated: These are REST APIs accessed via kubectl exec, not CRDs:

The file

We split this AGENTS.md into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When assisting with operational troubleshooting tasks (stuck clusters, deletion issues, resource cleanup), the following context is …

    line 15
  2. Very specific:

    Delete cluster: DELETE /api/aro_hcp/v1alpha1/clusters/<id> (MUST use aro_hcp endpoint, NOT clusters_mgmt)

    line 39
  3. Very specific:

    Orphaned namespace bundles: When CS deletes a cluster, it may leave behind the *-00-hcp-namespaces ResourceBundle in Maestro.

    line 68
  4. Very specific:

    Azure resources already gone: If the Azure resource group was deleted externally, the Hypershift operator will loop endlessly trying to …

    line 69
  5. Very specific:

    CP namespace stuck Terminating: Check kubectl get namespace <ns> -o json | jq '.status.conditions' — the NamespaceContentRemaining …

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Load all of CLAUDE.md for context

Image Bumps

For all image bump related tasks, see tooling/image-updater/AGENTS.md.

Component version bumps

For shared version bumps via tooling/component-updater (Istio mesh revision today; AKS/Grafana later), see tooling/component-updater/AGENTS.md.

Operational Troubleshooting Context

When assisting with operational troubleshooting tasks (stuck clusters, deletion issues, resource cleanup), the following context is essential.

Cluster Access

  • Management Cluster: hcpctl mc breakglass <mc-name> — writes kubeconfig to a temp file, you must export KUBECONFIG=<path> from the output
  • Service Cluster: hcpctl sc breakglass <svc-name> — same pattern, separate kubeconfig file
  • The kubeconfig paths are temporary and expire. If you get connection errors, the user needs to re-authenticate.
  • Context names follow the pattern: int-uksouth-mgmt-1, int-uksouth-svc-1, etc.

Architecture: Deletion Flow

The deletion chain flows top-down through these layers. Deleting resources at a lower layer without removing the source above will cause them to be recreated:

Clusters Service (API) → Maestro Server (ResourceBundle) → Maestro Agent → ManifestWork → HostedCluster → Control Plane

Service Cluster APIs

These are REST APIs accessed via kubectl exec, not CRDs:

  • Clusters Service (ns: clusters-service, deployment: clusters-service, port 8000):
    • List clusters: GET /api/clusters_mgmt/v1/clusters
    • Get cluster: GET /api/clusters_mgmt/v1/clusters/<id>
    • Delete cluster: DELETE /api/aro_hcp/v1alpha1/clusters/<id> (MUST use aro_hcp endpoint, NOT clusters_mgmt)
    • Container name: clusters-service-server (use with kubectl exec -c clusters-service-server)
  • Maestro Server (ns: maestro, deployment: maestro, port 8000):
    • List resource bundles: GET /api/maestro/v1/resource-bundles
    • Get bundle: GET /api/maestro/v1/resource-bundles/<id>
    • Delete bundle: DELETE /api/maestro/v1/resource-bundles/<id>
    • Container name: maestro-server
    • Resource bundles use UUIDs as names, not cluster IDs. Search by filtering manifest content with jq: jq --arg cid "<cluster-id>" '.items[] | select(.manifests | tostring | test($cid))'
    • Namespace-only bundles have label containsNamespaces: true and create *-00-hcp-namespaces ManifestWork

Management Cluster Resources

  • Namespaces: ocm-${CLUSTER_PREFIX}-${CLUSTER_ID} (HostedCluster ns) and ocm-${CLUSTER_PREFIX}-${CLUSTER_ID}-${CLUSTER_NAME} (Control Plane ns)
  • CLUSTER_PREFIX: arohcpint (int), arohcpstg (stage), arohcpprod (prod)
  • ManifestWork in local-cluster namespace, named by cluster ID
  • ManagedCluster is cluster-scoped, named by cluster ID

Common Finalizers That Block Deletion

FinalizerResourceController
hypershift.openshift.io/finalizerHostedCluster, HostedControlPlaneHypershift Operator
hypershift.openshift.io/component-finalizerDeployments in CP namespaceHypershift Operator
cluster.cluster.x-k8s.ioCluster (CAPI)Cluster API
cluster.open-cluster-management.io/manifest-work-cleanupManifestWorkACM Work Agent

Known Issues

  • Orphaned namespace bundles: When CS deletes a cluster, it may leave behind the *-00-hcp-namespaces ResourceBundle in Maestro. This causes the Maestro Agent to keep recreating the ManifestWork and namespace on the management cluster. Fix: delete the orphaned ResourceBundle from Maestro directly.
  • Azure resources already gone: If the Azure resource group was deleted externally, the Hypershift operator will loop endlessly trying to clean up non-existent resources. The hypershift.openshift.io/finalizer must be removed manually.
  • CP namespace stuck Terminating: Check kubectl get namespace <ns> -o json | jq '.status.conditions' — the NamespaceContentRemaining condition lists exactly which resources and finalizers are blocking.

Operational Docs

  • Cleanup Stuck Cluster Deletion — full troubleshooting procedure
  • Fix Maestro Stale Resource Bundle
  • HCP Cluster Creation Flow — includes component debug commands
  • Postgres Breakglass

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.