Fix Crossplane Bucket generation rule to use plural resource name

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 <cursoragent@cursor.com>
This commit is contained in:
stewartshea
2026-06-30 22:53:57 -04:00
parent 811f4f13be
commit fe0946a146
@@ -12,7 +12,7 @@ spec:
# Pin an explicit version like `buckets.storage.gcp.upbound.io/v1beta1` # Pin an explicit version like `buckets.storage.gcp.upbound.io/v1beta1`
# if you need schema stability across CRD upgrades. # if you need schema stability across CRD upgrades.
- resourceTypes: - resourceTypes:
- bucket.storage.gcp.upbound.io - buckets.storage.gcp.upbound.io
matchRules: matchRules:
# Match every Bucket by name. Swap this regex to scope by naming # Match every Bucket by name. Swap this regex to scope by naming
# convention (for example `^prod-.*` to only cover prod buckets) or # convention (for example `^prod-.*` to only cover prod buckets) or