This plugin adds the monitoring UI to the OpenShift web console.
Before you can deploy the plugin on a cluster, you must build an image and push it to an image registry.
-
Build the image:
docker build -t quay.io/my-repositroy/my-plugin:latest .
-
Run the image:
docker run -it --rm -d -p 9001:80 quay.io/my-repository/my-plugin:latest
-
Push the image:
docker push quay.io/my-repository/my-plugin:latest
NOTE: If you have a Mac with Apple silicon, you will need to add the flag --platform=linux/amd64
when building the image to target the correct platform to run in-cluster.
A Helm chart is available to deploy the plugin to an OpenShift environment.
The following Helm parameters are required:
plugin.image
: The location of the image containing the plugin that was previously pushed
Additional parameters can be specified if desired. Consult the chart values file for the full set of supported parameters.
Install the chart into a new namespace or an existing namespace as specified by the my-plugin-namespace
parameter and providing the location of the image within the plugin.image
parameter by using the following command:
helm upgrade -i monitoring-plugin charts/openshift-console-plugin -n my-plugin-namespace --create-namespace --set plugin.image=my-plugin-image-location
- Node.js and npm are required
- oc
- podman 3.2.0+ or Docker
- An OpenShift cluster
# Login to an OpenShift cluster
$ oc login <clusterAddress> -u <username> -p <password>
# Start podman (or Docker)
$ podman machine init
$ podman machine start
# Install dependencies
$ make install
# Run the application
$ make start-frontend
# In a separate terminal
$ make start-console
The application will be running at localhost:9000.
- Disable cache. Select 'disable cache' in your browser's DevTools > Network > 'disable cache'. Or use private/incognito mode in your browser.
- Enable higher log verbosity by setting
-log-level=trace
when starting the plugin backend. For more options to set log level see logrus documentation.
- Local Development Dependencies
- yq
- sed (gnu-sed for mac, with sed being aliased to that gnu-sed)
Due to the extensive number of items which would need to be run to locally run the ACM perspective, the suggested development pattern is instead repeat installations with helm. A small number of scripts have been put together to help you deploy the monitoring-plugin in its acm
configuration. REGISTRY_ORG and TAG variables are available to adjust the quay image generated and used for deployment. Certain build time changes to the codebase are created when running these scripts. On Mac's these changes are not only run with the Dockerfiles, so it is not suggested to cancel the exection of this scipt part way through
make deploy-acm