Skip to content

🚀 Feature: Add Git Commit Hash Tracking to Flux-Deployed XRDs #50

@michaelstingl

Description

@michaelstingl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions