Files
simple-private-codecollection/codebundles/gcp-bucket-crossplane-health/.runwhen/generation-rules/gcp-bucket-crossplane-health.yaml
T
stewartshea eb8160e659 Initial scaffold: generation-rule-only Crossplane Bucket example
Educational RunWhen CodeCollection that discovers Crossplane GCP
Bucket CRDs (storage.gcp.upbound.io/v1beta1) and generates one SLX
per bucket. Ships only generation rules and Jinja templates; the
runtime lives in rw-generic-codecollection/k8s-kubectl-cmd (already
loaded by the airgap runner).

Includes:
- codebundles/gcp-bucket-crossplane-health with generation rule + 3 templates
- docs/01..07 numbered training chapters with screenshot placeholders
- README, .gitignore

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 21:51:04 -04:00

35 lines
1.5 KiB
YAML

apiVersion: runwhen.com/v1
kind: GenerationRules
spec:
platform: kubernetes
generationRules:
# Discover every Crossplane GCP Bucket in the cluster.
# Resource type syntax: plural.group/version
# plural = buckets (from `kubectl api-resources | grep storage.gcp.upbound.io`)
# group = storage.gcp.upbound.io
# version = v1beta1 (omit /version to use the API server's preferred version)
- resourceTypes:
- buckets.storage.gcp.upbound.io/v1beta1
matchRules:
# Match every Bucket by name. Swap this regex to scope by naming
# convention (for example `^prod-.*` to only cover prod buckets) or
# use `type: exists` on a label like `metadata/labels/env`.
- type: pattern
pattern: ".+"
properties: [name]
mode: substring
slxs:
# Crossplane Buckets are cluster-scoped, so we qualify by `resource`
# (the bucket name) and `cluster` only — there is no namespace.
- baseName: xp-bkt-hlth
qualifiers: ["resource", "cluster"]
baseTemplateName: gcp-bucket-crossplane-health
levelOfDetail: detailed
outputItems:
- type: slx
- type: sli
- type: runbook
# Runbook uses the *-taskset.yaml template convention because
# RunWhen historically calls a Runbook a "TaskSet" in the UI.
templateName: gcp-bucket-crossplane-health-taskset.yaml