Skip to content

Scaffold OpenShift Console Dynamic Plugin for Bob builds #44

@vtz

Description

@vtz

Context

We want to surface BuildJob, Toolchain, and artifact information natively in the OpenShift web console, rather than relying only on the CLI or the auto-generated CRD views. The proper way to do this is with an OpenShift Console Dynamic Plugin.

Scope

Scaffold the plugin project with:

  • React + PatternFly + @openshift-console/dynamic-plugin-sdk setup
  • Webpack configuration for dynamic plugin loading
  • console-extensions.json declaring navigation and route extensions
  • Dockerfile for building the plugin image
  • ConsolePlugin CR manifest for deployment
  • Nginx/serve config to serve the static assets
  • Basic dev workflow (local proxy against a remote cluster)

Project Structure

console-plugin/
├── package.json
├── tsconfig.json
├── webpack.config.ts
├── Dockerfile
├── console-extensions.json
├── deploy/
│   └── consoleplugin.yaml
└── src/
    ├── components/
    └── utils/
        └── k8s.ts

Deployment

apiVersion: console.openshift.io/v1
kind: ConsolePlugin
metadata:
  name: bob-console-plugin
spec:
  displayName: "Bob Build Dashboard"
  backend:
    type: Service
    service:
      name: bob-console-plugin
      namespace: bob-system
      port: 9443

Enable:

oc patch consoles.operator.openshift.io cluster \
  --type=merge --patch '{"spec":{"plugins":["bob-console-plugin"]}}'

Notes

  • The plugin runs under the logged-in user's credentials (console proxies API calls with the user's token), so RBAC is inherited automatically — admin vs developer access works out of the box.
  • Depends on: nothing (can be scaffolded independently)

Metadata

Metadata

Assignees

No one assigned

    Labels

    console-pluginOpenShift Console Dynamic PluginenhancementNew feature or requestuxUser experience and UI

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions