Create a RuntimeConditionsProfile in each cluster where the codebase is deployed (dev, prod, federal, ...):
apiVersion: runtimeconditions.io/v1alpha1
kind: RuntimeConditionsProfile
metadata:
name: request-coordinator
namespace: default
spec:
workload:
uri: https://github.com/my-org/request-coordinator # must equal the Component's source-location, minus "url:"
version: v1.2.3 # optional
extensions:
- https://runtimeconditions.io/extensions/rc/stock/runtimeconditions.extension.yaml
conditions:
- name: available-stock-capability
kind: Capability
interface:
type: rest-api
- name: datastore
kind: Datastore
optional: true
interface:
type: postgresApply it per cluster: kubectl apply -f profile.yaml -n default --context <cluster>.
Correlation check: the Component's catalog YAML must carry
metadata.annotations.backstage.io/source-location: url:https://github.com/my-org/request-coordinator.
The plugin strips url: and compares to workload.uri exactly.
Open the Component in Backstage, then the Runtime Conditions tab. You get one card per cluster where a matching profile exists. Each card shows:
- the workload URI and cluster,
- the extensions, linked to their definition in the
runtimeconditions/extensionsrepo when they follow the standard URL shape, - a conditions table with columns: Name, Kind, Interface, Optional, "Fulfilled in" (N environments, or
none).
Expanding a condition row shows every reported fulfillment: environment, resource kind, provider, reference, and automation tool. The reference links to the referenced component's Kubernetes tab when provider: kubernetes and a componentRef was posted.
A condition with no reported fulfillment shows none. Fulfillment is never inferred.
Adapters (platform-side automation) register what fulfills a condition:
curl -X POST $BACKSTAGE_BACKEND/api/runtime-conditions/fulfillments \
-H 'Content-Type: application/json' \
-d '{
"profileName": "request-coordinator",
"condition": "available-stock-capability",
"environment": "dev",
"resources": [
{
"kind": "CiliumNetworkPolicy",
"provider": "kubernetes",
"reference": "rc-cilium/applications/request-coordinator-egress",
"componentRef": "component:default/inventory-service",
"automation": { "tool": "kratix", "reference": "cnp-promise" }
}
]
}'Rules, enforced by the backend (returns 400 otherwise):
profileName,condition,environment, and a non-emptyresourcesarray are required. Each resource needskind,provider,reference.resourcesis always an array. One condition is typically fulfilled by several resources (e.g.CiliumNetworkPolicyplus cert-managerCertificate).referenceis whatever uniquely identifies the resource in its environment:cluster/namespace/kind/namefor Kubernetes, an ARN for cloud, and so on.providerandautomation.toolare free-form strings, not enums.componentRefandautomationare optional. Withprovider: "kubernetes"andcomponentRef: component:default/<name>, the UI links the reference to that component's Kubernetes tab.- POSTs are purely additive. Nothing is keyed or overwritten. Multiple adapters can POST the same profile, condition, and environment concurrently. Resources accumulate.
GET /api/runtime-conditions/fulfillments?profileName=request-coordinator
GET /api/runtime-conditions/fulfillments?profileName=request-coordinator&condition=datastore
Both query params are optional filters. The frontend uses the profileName form.
See runtimeconditions/rc-demos, path cilium-policy/adapter, for a working adapter that reports CiliumNetworkPolicy fulfillments.