Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 3.19 KB

File metadata and controls

65 lines (43 loc) · 3.19 KB

ARCHITECTURE

Console Dynamic Plugin SDK

The console-dynamic-plugin-sdk is a key part of this repository - it's the public API that enables OpenShift Console's extensibility.

Key packages & areas

Core packages

  • console-dynamic-plugin-sdk: Public API for external plugins (⚠️ breaking changes require careful vetting)
  • console-app: Main application that loads all plugins
  • console-shared: Shared utilities and components
  • console-internal: Core UI and Kubernetes integration

Dynamic plugins

For the complete list of console plugins, see console-app/package.json dependencies. Static plugins (built-in) may be deprecated or extracted over time.

  • Extension Points System: 25+ extension types (NavItem, Page, ResourceListPage, DashboardsCard, etc.)
  • Module Federation: Runtime plugin loading via Webpack Module Federation
  • Type Safety: Comprehensive TypeScript definitions for all extension points
  • Code References: Lazy loading with $codeRef for performance

Official extension types & API documentation

Critical Considerations

  • ⚠️ BREAKING CHANGES REQUIRE EXTREME CARE: This is a public API consumed by external plugins
  • Backward Compatibility: Must maintain compatibility across versions
  • Schema Evolution: Extension schema changes need migration paths
  • Performance Impact: Plugin loading affects console startup time
  • Type Safety: Strong TypeScript support prevents runtime errors

⚠️ Public API Sources - Breaking Change Risk

The dynamic plugin SDK re-exports APIs from multiple Console packages:

  • @console/shared - Dashboard components, UI components, hooks
  • @console/internal - Core UI, editors, hooks, K8s utilities
  • @console/plugin-sdk - Extension system, plugin infrastructure
  • @console/app - Application context
  • @console/topology - Topology components, data transforms, graph views

BEFORE MODIFYING ANYTHING IN THESE OR OTHER PACKAGES: Verify SDK re-exports by checking frontend/packages/console-dynamic-plugin-sdk/src/api/internal-*.ts files to avoid breaking the public API.

SDK Utilities

  • Resource Hooks: useK8sWatchResource, useActivePerspective, useActiveNamespace
  • Component Utilities: Navigation helpers, telemetry, validation
  • Build Integration: ConsoleRemotePlugin for Webpack Module Federation

Development Guidelines

SDK-Specific:

  • Always consider impact on external plugin developers
  • Maintain backward compatibility as it's a public API
  • Comprehensive documentation for all public APIs

For detailed plugin API review guidelines and workflow, use the plugin-api-review skill to ensure all changes are properly vetted for public API impact.