How cloudnative-pg/cnpg-headlamp-plugin works
CNPG Headlamp Plugin is a Kubernetes UI for managing CloudNativePG clusters and related resources. The principal workflow is navigating from Headlamp into a resource view, inspecting or creating the resource, and using cluster-specific actions for operations and observability. The graph preserves the documented cluster, backup, pooler, database, and supporting-resource capabilities. Some resource internals were not sampled, so uncertain links are omitted; the README supports documented capability edges, while the route registrations and source index support the shown routing and module references.
Main entry points: index.tsx Plugin routes · Detail.tsx Cluster views · cluster.ts Cluster API resource · mapView.tsx Cluster map
Components 24
Navigation
- Plugin routes
src/index.tsx - Cluster map
src/mapView.tsx
Cluster operations
- Cluster views
src/components/clusters/Detail.tsx - Cluster creation
src/components/clusters/create/CreatePage.tsx - Cluster actions
src/components/clusters - Cluster log stream
src/components/clusters/logs/LogStream.tsx - Pod log collection
src/components/clusters/logs/useClusterPostgresLogs.ts - Log parsing
src/resources/postgresLog.ts - Live metrics
src/components/common/postgresMetrics.ts - Pod tools
src/components/common/podActions.tsx - Cluster API resource
src/resources/cluster.ts
Backup management
- Backup views
src/components/backups/List.tsx - Backup creation
src/components/backups/Create.tsx - Scheduled backups
src/components/scheduledbackups/List.tsx - Backup resources
src/resources/backup.ts
CNPG resources
- Poolers
src/components/poolers/List.tsx - Database objects
src/components/databases/Create.tsx - Database roles
src/components/databaseroles/Create.tsx - Publications and subscriptions
src/components/publications/Create.tsx - Object stores
src/components/objectstores/Create.tsx - Image catalogs
src/components/imagecatalogs/List.tsx - Operator status
src/components/status/OperatorStatus.tsx
Other components
- Operator
- Headlamp UI
Connections 31
- Operator → Headlamp UI: uses
- Headlamp UI → Plugin routes: loads plugin
src/index.tsx - Plugin routes → Cluster views: routes to
src/index.tsx - Plugin routes → Cluster creation: routes to
src/index.tsx - Plugin routes → Backup views: routes to
src/index.tsx - Plugin routes → Poolers: routes to
src/index.tsx - Plugin routes → Database objects: routes to
src/index.tsx - Plugin routes → Database roles: routes to
src/index.tsx - Plugin routes → Publications and subscriptions: routes to
src/index.tsx - Plugin routes → Object stores: routes to
src/index.tsx - Plugin routes → Image catalogs: routes to
src/index.tsx - Plugin routes → Operator status: routes to
src/index.tsx - Headlamp UI → Cluster map: shows map
- Cluster map → Cluster API resource: lists clusters
src/mapView.tsx - Cluster map → Cluster views: opens details
src/mapView.tsx - Cluster views → Cluster API resource: uses
src/components/clusters/Detail.tsx - Cluster views → Cluster log stream: provides logs
- Cluster views → Live metrics: shows metrics
src/components/clusters/Detail.tsx - Cluster views → Cluster actions: offers actions
src/components/clusters/Detail.tsx - Cluster views → Pod tools: offers pod tools
src/components/clusters/Detail.tsx - Cluster log stream → Pod log collection: collects logs
- Pod log collection → Log parsing: parses lines
src/components/clusters/logs/useClusterPostgresLogs.ts - Backup views → Backup creation: starts creation
src/components/clusters/Detail.tsx - Backup creation → Backup resources: uses
src/components/backups/Create.tsx - Scheduled backups → Backup resources: uses
- Cluster views → Backup views: shows backups
src/components/clusters/Detail.tsx - Cluster creation → Cluster API resource: configures cluster
- Poolers → Cluster API resource: associates cluster
- Database objects → Cluster API resource: selects cluster
src/components/databases/Create.tsx - Database roles → Cluster API resource: selects cluster
src/components/databaseroles/Create.tsx - Publications and subscriptions → Cluster API resource: selects cluster
src/components/publications/Create.tsx