From fe0946a14663ed3c11f74c119c7557817bc979a3 Mon Sep 17 00:00:00 2001 From: stewartshea Date: Tue, 30 Jun 2026 22:53:57 -0400 Subject: [PATCH] Fix Crossplane Bucket generation rule to use plural resource name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert the earlier typo that changed the resourceTypes entry from `buckets.storage.gcp.upbound.io` to `bucket.storage.gcp.upbound.io` under the mistaken rationale of "consistency with preferred API version". Kubernetes resource type specs in generation rules use the API plural name (as reported by `kubectl api-resources`), which for this CRD is `buckets`. Confirmed against the live cluster: kubectl api-resources --api-group=storage.gcp.upbound.io NAME=buckets NAMESPACED=false KIND=Bucket Symptom of the typo (from workspace-builder logs, image `806-merge-343c86e3`): Trying custom resource bucket.storage.gcp.upbound.io Error scanning for custom resource instances; error: (403) The 403 was misleading — it isn't an RBAC problem (the ClusterRole correctly grants get/list/watch on `buckets`); it's the API server rejecting a call for a resource type that doesn't exist. The scope-aware discovery from runwhen-local PR #806 is working; it just had the wrong plural to look up. Co-authored-by: Cursor --- .../.runwhen/generation-rules/gcp-bucket-crossplane-health.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codebundles/gcp-bucket-crossplane-health/.runwhen/generation-rules/gcp-bucket-crossplane-health.yaml b/codebundles/gcp-bucket-crossplane-health/.runwhen/generation-rules/gcp-bucket-crossplane-health.yaml index 2b36af0..4b4b1e0 100644 --- a/codebundles/gcp-bucket-crossplane-health/.runwhen/generation-rules/gcp-bucket-crossplane-health.yaml +++ b/codebundles/gcp-bucket-crossplane-health/.runwhen/generation-rules/gcp-bucket-crossplane-health.yaml @@ -12,7 +12,7 @@ spec: # Pin an explicit version like `buckets.storage.gcp.upbound.io/v1beta1` # if you need schema stability across CRD upgrades. - resourceTypes: - - bucket.storage.gcp.upbound.io + - buckets.storage.gcp.upbound.io matchRules: # Match every Bucket by name. Swap this regex to scope by naming # convention (for example `^prod-.*` to only cover prod buckets) or