Fix resource type definition in GCP Bucket generation rules and update documentation on runwhen-local limitations
Updated the resource type in the GCP Bucket generation rules from `buckets.storage.gcp.upbound.io` to `bucket.storage.gcp.upbound.io` for consistency with the preferred API version. Additionally, enhanced the documentation in `08-current-limitations.md` to clarify the current state of custom-resource discovery in runwhen-local, addressing two specific issues encountered during validation. This change ensures accurate resource type definitions and improves clarity on limitations affecting cluster-scoped CRDs.
This commit is contained in:
+1
-1
@@ -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:
|
||||||
- buckets.storage.gcp.upbound.io
|
- bucket.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
|
||||||
|
|||||||
@@ -2,14 +2,28 @@
|
|||||||
|
|
||||||
## What you'll learn here
|
## What you'll learn here
|
||||||
|
|
||||||
Two upstream limitations in `runwhen-local` (verified against image
|
Custom-resource discovery in `runwhen-local` **works today** for the
|
||||||
`runwhen-local:0.11.0` and the tip of the `main` branch) that block a
|
common case — every existing generation rule in `rw-cli-codecollection`
|
||||||
"generation-rule only" example targeting **cluster-scoped** Crossplane
|
that targets a CRD (Flux HelmRelease, cert-manager Certificate,
|
||||||
CRDs like GCP Buckets. These are honest observations from the live
|
Prometheus, ArgoCD Application, Crunchy/Zalando Postgres, etc.)
|
||||||
validation run we performed during iteration 1 — they are not blockers
|
discovers and renders SLXs correctly. Iteration 1's validation, however,
|
||||||
for teaching the pattern, but they are blockers for observing generated
|
surfaced two narrow, conditional issues in the current code path
|
||||||
SLXs in the RunWhen UI. This chapter lists the issues, the workaround
|
(verified against image `runwhen-local:0.11.0` and the tip of `main`)
|
||||||
we already applied, and the fixes still owing.
|
that together prevent this specific example from rendering SLXs today:
|
||||||
|
|
||||||
|
1. A `NameError` triggered only when a generation rule pins a version
|
||||||
|
(e.g. `plural.group/v1beta1`). Existing rules that omit the version
|
||||||
|
are unaffected — that's why nothing broke before.
|
||||||
|
2. A namespaced-only listing call for CRDs, which returns 404 for
|
||||||
|
**cluster-scoped** CRDs. Every existing CRD referenced by
|
||||||
|
`rw-cli-codecollection` is namespaced, so this had no prior surface.
|
||||||
|
Crossplane managed resources like `buckets.storage.gcp.upbound.io`
|
||||||
|
are the first cluster-scoped CRDs the pattern has been used against.
|
||||||
|
|
||||||
|
Both are small, contained fixes. The larger "generation-rule only"
|
||||||
|
pattern this codecollection is teaching is otherwise fully working —
|
||||||
|
the workspace-builder clones the private CC, loads the generation
|
||||||
|
rule, and attempts discovery correctly.
|
||||||
|
|
||||||
## Issue #1 — `KubernetesResourceTypeSpec` `NameError` when a resource type is version-pinned
|
## Issue #1 — `KubernetesResourceTypeSpec` `NameError` when a resource type is version-pinned
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user