-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
When XRDs are deployed via Flux, the generated Backstage templates don't include git metadata (commit hash, repository name) for traceability.
Root Cause
Bug in TeraSky Kubernetes Ingestor plugin: The extractCustomAnnotations function exists but isn't called for XRD template generation.
Solution
✅ Fixed in fork: https://github.com/open-service-portal/backstage-terasky-plugins-fork/pull/1
The plugin already has all the infrastructure - it just wasn't connected for XRD templates. Our fix adds the missing method call.
Usage
After the fix, you can add custom annotations to XRDs:
apiVersion: apiextensions.crossplane.io/v2
kind: CompositeResourceDefinition
metadata:
annotations:
# Transfer any annotations to generated Backstage templates
terasky.backstage.io/component-annotations: "terasky.backstage.io/git-hash=4e79cfe,terasky.backstage.io/git-repo=template-cloudflare-dnsrecord,terasky.backstage.io/source=flux"These annotations will appear in the generated Backstage template:
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
annotations:
terasky.backstage.io/git-hash: "4e79cfe"
terasky.backstage.io/git-repo: "template-cloudflare-dnsrecord"
terasky.backstage.io/source: "flux"Details
- Research: https://gist.github.com/michaelstingl/a81166ef02f058051ed1ace8a00b189a
- Format: Component-annotations use
"key=value,key2=value2"format (not JSON) - Scope: Works for all XRD-generated templates with
terasky.backstage.io/generate-form=truelabel
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
📋 Backlog