Context
End-to-end wiring for the kro-based BackstageTemplateRun trigger is now in place (see backstage-template-execution/trigger/):
- KRO RGD installed and
Active on ci-mgmt-t1
dapr-backstage-template-execution worker pod reaches Backstage over HTTPS (internal CA mounted via backstage-ca Secret)
- daprd sidecar bound to
0.0.0.0:3500 so the trigger Job can POST workflow starts
- Applying
trigger/examples/create-terraform-vm.yaml successfully creates CM + Job, starts a workflow instance, and the worker picks it up
However the very first real run fails at step 1 with Backstage HTTP 401 Missing credentials because the BACKSTAGE_AUTH_TOKEN env var is empty — the upstream Secret/dapr-backstage-tpl-vars in flux-system only contains REDIS_PASSWORD.
Tasks
Follow-ups
Reference
Trigger CR: backstage-template-execution/trigger/examples/create-terraform-vm.yaml
RGD: backstage-template-execution/trigger/rgd.yaml
Worker app: flux/apps/dapr/components/template-execution/
Context
End-to-end wiring for the kro-based
BackstageTemplateRuntrigger is now in place (seebackstage-template-execution/trigger/):Activeonci-mgmt-t1dapr-backstage-template-executionworker pod reaches Backstage over HTTPS (internal CA mounted viabackstage-caSecret)0.0.0.0:3500so the trigger Job can POST workflow startstrigger/examples/create-terraform-vm.yamlsuccessfully creates CM + Job, starts a workflow instance, and the worker picks it upHowever the very first real run fails at step 1 with Backstage
HTTP 401 Missing credentialsbecause theBACKSTAGE_AUTH_TOKENenv var is empty — the upstreamSecret/dapr-backstage-tpl-varsinflux-systemonly containsREDIS_PASSWORD.Tasks
https://backstage.platform.sthings-vsphere.labul.sva.deBACKSTAGE_AUTH_TOKENtoSecret/dapr-backstage-tpl-varsinflux-systemonci-mgmt-t1(patch or full re-apply)flux reconcile kustomization dapr-backstage-template-execution --with-sourceto re-renderSecret/backstage-auth-tokeninbackstage-workflowskubectl -n backstage-workflows rollout restart deploy/backstage-template-execution(env is wired viasecretKeyRef, only read at pod start)trigger/examples/create-terraform-vm.yamlwithdryRun: trueand confirm the workflow reachesCOMPLETEDwithout the 401dryRun: falsefor a real VM run and verify thewatchblock picks up the resulting PR / GitHub Actions runBackstageTemplateRunCR after the test so kro doesn't re-create the Job on every reconcileFollow-ups
dapr-backstage-tpl-varsout of in-cluster manual state and into a SOPS-encrypted secret committed understuttgart-things/clusters/labul/vsphere/cd-mgmt-1/— currently it only exists because someonekubectl apply'd it once, so it won't survive a cluster rebuildGITHUB_TOKENReference
Trigger CR:
backstage-template-execution/trigger/examples/create-terraform-vm.yamlRGD:
backstage-template-execution/trigger/rgd.yamlWorker app:
flux/apps/dapr/components/template-execution/