This project provides a console plugin for Quarkus. The project is created using openshift console plugin template
For development you can login to an existing OpenShift and run the console with the plugin included locally. Note: Works well with OpenShift Sandbox.
In one terminal window, run:
cd plugin
yarn install
yarn run start
In another terminal window, run:
After running oc login
(requires oc and an OpenShift cluster)
cd plugin
yarn run start-console
(requires Docker or podman 3.2.0+)
This will run the OpenShift console in a container connected to the cluster you've logged into. The plugin HTTP server runs on port 9001 with CORS enabled. Navigate to http://localhost:9000/example to see the running plugin.
To deploy the console plugin to an actual OpenShift cluster the following are needed:
docker build -t docker.io/iocanel/quarkus-openshift-console-plugin:latest .
docker push docker.io/iocanel/quarkus-openshift-console-plugin:latest
Note: The image docker.io/iocanel/quarkus-openshift-console-plguin:latest
is published so it can be pulled instead.
oc new-project plugin-quarkus-openshift-console-plugin
helm upgrade -i quarkus-openshift-console-plugin charts/openshift-console-plugin --namespace plugin-quarkus-openshift-console-plugin --set plugin.image=docker.io/iocanel/quarkus-openshift-console-plugin:latest
This project provides a shell script that logs in to the cluster and installs the plugin in a single step. This script can be installed to the Quarkus CLI as a plugin:
quakrus plug add bin/quarkus-install-openshift-console-plugin
Then it can be used:
quarkus install-openshift-console-plugin --token=<token> --server=<server url>
In the developer perpective the Quarkus section is now shown:
The frontend is able to retrieve information from the console using the following APIs:
Examples:
- /api/kubernetes/apis/apps/v1/namespaces//deployments
- /api/kubernetes/apis/apps.openshift.io/v1/namespaces//deploymentconfigs
Examples:
- /api/prometheus/api/v1/query_range