Files
simple-private-codecollection/codebundles/gcp-bucket-crossplane-health/.runwhen/generation-rules/gcp-bucket-crossplane-health.yaml
T
stewartshea 31ac475c97 Update Crossplane GCP Bucket generation rules to use preferred API version
Modified the generation rules for Crossplane GCP Buckets to omit the version in resource type definitions, allowing the use of the API server's preferred version (currently v1beta2). Updated documentation to reflect this change and clarify version pinning for schema stability.

Changes include:
- Updated YAML generation rules to remove explicit versioning.
- Revised documentation to explain the implications of omitting versioning and the preferred version usage.

This enhances resilience across CRD upgrades and simplifies the configuration for users.
2026-06-30 21:55:36 -04:00

38 lines
1.6 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 = omitted (use the API server's preferred version — currently v1beta2)
#
# Pin an explicit version like `buckets.storage.gcp.upbound.io/v1beta1`
# if you need schema stability across CRD upgrades.
- resourceTypes:
- 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
# 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