Backstage plugins for Flanksource Mission Control - view config health, changes, costs, and health checks directly in Backstage entity pages.
| Package | Description |
|---|---|
@flanksource/backstage-plugin-mission-control |
Frontend plugin - entity cards, tabs, and tables |
@flanksource/backstage-plugin-mission-control-backend |
Backend plugin - MC API proxy with auth |
The demo/ directory contains a complete Backstage app with the plugin pre-installed, pointing at demo.flanksource.com.
- Node.js 20+
- Yarn 1.x (
npm install -g yarn)
cd demo
export MC_API_TOKEN="your-mission-control-api-token"
yarn install
yarn devOpen http://localhost:3000 and navigate to the catalog. Annotated entities will show a Mission Control card on the overview tab and a dedicated Mission Control tab.
# Frontend
yarn --cwd packages/app add @flanksource/backstage-plugin-mission-control
# Backend
yarn --cwd packages/backend add @flanksource/backstage-plugin-mission-control-backend// packages/backend/src/index.ts
const backend = createBackend();
// ... other plugins
backend.add(import('@flanksource/backstage-plugin-mission-control-backend'));
backend.start();// packages/app/src/components/catalog/EntityPage.tsx
import {
EntityMissionControlContent,
EntityMissionControlCard,
isMissionControlAvailable,
} from '@flanksource/backstage-plugin-mission-control';
// Add the card to your overview tab:
<EntitySwitch>
<EntitySwitch.Case if={isMissionControlAvailable}>
<Grid item md={12}>
<EntityMissionControlCard />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
// Add a dedicated tab:
<EntityLayout.Route
path="/mission-control"
title="Mission Control"
if={isMissionControlAvailable}
>
<EntityMissionControlContent />
</EntityLayout.Route>missionControl:
baseUrl: https://your-mission-control-instance.example.com
auth:
method: static-token
apiToken: ${MC_API_TOKEN}apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: my-service
annotations:
flanksource.com/config-id: "your-config-uuid"
spec:
type: service
lifecycle: production
owner: my-team| Annotation | Description | Example |
|---|---|---|
flanksource.com/config-id |
Single config item UUID | "8555f73a-2d9c-46d3-b881-ac8b57347bee" |
flanksource.com/config-ids |
Multiple config UUIDs (comma-separated) | "uuid1,uuid2,uuid3" |
flanksource.com/config-type |
Config type for name-based matching | "Kubernetes::Deployment" |
flanksource.com/config-name |
Config name (used with config-type) | "argocd-server" |
flanksource.com/check-id |
Direct health check UUID | "uuid" |
flanksource.com/aggregation-depth |
Related config depth (0=self, 1=direct, 2+=recursive) | "1" |
Resolution order: config-id > config-ids > config-type + config-name > entity name fallback.
missionControl:
baseUrl: https://mc.example.com
auth:
method: static-token
apiToken: ${MC_API_TOKEN}The token is sent as HTTP Basic Auth (token:<apiToken>).
missionControl:
baseUrl: https://mc.example.com
auth:
method: token-exchange
serviceAccountToken: ${MC_SERVICE_ACCOUNT_TOKEN}Exchanges Backstage user identity for a Mission Control session token, cached per-user.
- Overall health indicator (worst status across configs)
- Healthy / unhealthy / warning counts
- 30-day cost total
- Recent change count
- Health check pass/fail ratio
- Config Items table: Name, Type, Health, Changes, Cost (30d), Updated
- Health Checks table: Name, Type, Status, Severity, Last Run
Entities without flanksource.com/* annotations automatically hide the MC card and tab.
- Verify
MC_API_TOKENis set:echo $MC_API_TOKEN - Test the token directly:
curl -u "token:$MC_API_TOKEN" https://your-mc-instance/api/db/configs?limit=1
- The entity must have at least one of:
flanksource.com/config-id,flanksource.com/config-ids, orflanksource.com/config-type - Check entity YAML annotations in the Backstage catalog
- Verify the config UUID exists in Mission Control
- Query configs:
curl -u "token:$MC_API_TOKEN" https://your-mc-instance/api/db/configs?select=id,name,type&limit=20
- Ensure
backend.add(import('@flanksource/backstage-plugin-mission-control-backend'))is in your backend'sindex.ts - Check backend logs for
Mission Control backend plugin initialized
- The backend plugin proxies all requests - the browser should never call MC directly
- Verify
backend.csp.connect-srcincludes'self'inapp-config.yaml
# Install all dependencies
yarn install
# Build plugins
yarn build
# Run tests
yarn testApache-2.0