Skip to content

openshift/console-dashboards-plugin

Repository files navigation

Dashboards Dynamic Plugin for OpenShift Console

This plugin adds custom datasources for OpenShift dashboards. It requires OpenShift 4.10+

Development

Node.js, npm and go are required to build and run the plugin. To run OpenShift console in a container, either Docker or podman 3.2.0+ and oc are required.

Running locally

  1. Install the dependencies with make install
  2. Start the backend with make start-backend
  3. In a different terminal, start the frontend with make start-frontend
  4. In a different terminal, start the console a. oc login (requires oc and an OpenShift cluster) b. make 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 backend server runs on port 9002 with CORS enabled.

Navigate to http://localhost:9000 to see the running plugin.

Building the image

make build-image

Deployment on cluster

You can deploy the plugin into a cluster by running the helm chart at charts/console-dashboards-plugin. It will use the image from quay.io/gbernal/console-dashboards-plugin:0.0.1 and run a go HTTP server to serve the plugin's assets and proxy to the configured datasources.

helm upgrade -i console-dashboards-plugin charts/console-dashboards-plugin -n console-dashboards --create-namespace

Add a new Datasource

See add datasource docs

Deploy an Example Datasource and Dashboard:

  1. oc login (requires oc and an OpenShift cluster)
  2. Deploy the plugin on the cluster helm upgrade -i console-dashboards-plugin charts/console-dashboards-plugin -n console-dashboards --create-namespace
  3. Run make example to deploy a testing datasource connected to the in-cluster prometheus
  4. Go to the OpenShift console. Then from the navigation menu, select 'Observe.' This selection will drop down more options; click 'Dashboards.' You'll see the example dashboard named '** DASHBOARD EXAMPLE **.'

Local Development Troubleshooting

  1. Disable cache. Select 'disable cache' in your browser's DevTools > Network > 'disable cache'. Or use private/incognito mode in your browser.
  2. Enable higher log verbosity by setting -log-level=trace when starting the plugin backend. For more options to set log level see logrus documentation.

About

Plugin to add enhanced dashboards to Openshift console

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors