Skip to content

Latest commit

 

History

History
75 lines (49 loc) · 2.61 KB

README.md

File metadata and controls

75 lines (49 loc) · 2.61 KB

Camel OpenShift Console Plugin

This project provides a console plugin for Camel. The project is created using openshift console plugin template

Local Development

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 podman 3.2.0+ or Docker)

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.

Deployment to OpenShift

To deploy the console plugin to an actual OpenShift cluster the following are needed:

Building the images locally

podman build -t quay.io/cmiranda/camel-openshift-console-plugin:latest .
podman push quay.io/cmiranda/camel-openshift-console-plugin:latest

Note: The image quay.io/cmiranda/camel-openshift-console-plguin:latest is published so it can be pulled instead.

Deploying the plugin using Helm

oc new-project plugin-camel-openshift-console-plugin
helm upgrade -i camel-openshift-console-plugin charts/openshift-console-plugin --namespace plugin-camel-openshift-console-plugin --set plugin.image=quay.io/cmiranda/camel-openshift-console-plugin:latest

The Camel Tab

In the developer perpective the Camel section is now shown: The Camel Plugin Home

Development notes

The frontend is able to retrieve information from the console using the following APIs:

Kubernetes API /api/kubernetes

Examples:

  • /api/kubernetes/apis/apps/v1/namespaces//deployments
  • /api/kubernetes/apis/apps.openshift.io/v1/namespaces//deploymentconfigs

Prometheus API /api/prometheus

Examples:

  • /api/prometheus/api/v1/query_range