How to develop with other console plugins
Closed this issue · 3 comments
Hi, I'm a Red Hat ISV partner developing a plugin that will add a horizontal nav tab to the VirtualMachine page. However, the kubevirt-plugin that is loaded and enabled in my OpenShift cluster is not enabled in the local OKD console. How do I load both the plugins that are enabled on the remote cluster, as well as my local plugin in development?
Hi, @evanstoner. Your best bet is to build and run the kubevirt plugin locally from https://github.com/kubevirt-ui/kubevirt-plugin. Then you can change BRIDGE_PLUGINS
in the start script to load both plugins:
https://github.com/openshift/console-plugin-template/blob/main/start-console.sh#L45
We can look at adding a way to load both plugins running on the cluster and local plugins for development. It's a little tricky, though, since plugin services aren't exposed through a route, so they can't be loaded by a console running off-cluster.
An alternative might be to expose the plugin service by creating a route on the cluster and point your local console to the plugin route.
Exposing the route and adding it to BRIDGE_PLUGINS
worked, and avoided local dependency resolution for the KubeVirt plugin. Thanks! FYI I've opened kubevirt-ui/kubevirt-plugin#2085 as a followup.