Sen descrición

Samuel Padgett e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
src e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
.eslintrc.yml e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
.gitignore e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
.prettierrc.yml e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
Dockerfile e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
LICENSE e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
README.md e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
console-extensions.json e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
manifest.yaml e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
package.json e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
tsconfig.json e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
webpack.config.ts e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos
yarn.lock e9fb978540 initial commit %!s(int64=4) %!d(string=hai) anos

README.md

OpenShift Console Plugin Template

This project is a minimal template for writing a new OpenShift Console dynamic plugin. It requires OpenShift 4.10.

Node.js and yarn are required to build and run the example. When installed, run these commands:

Update the plugin metadata

After cloning this repo, you should update the plugin metadata such as the plugin name. The metadata is defined in the consolePlugin stanza of package.json. Additionally, update references to console-plugin-template and the plugin image in manifest.yaml. Your plugin must have a unique name.

Local development

  1. yarn install
  2. yarn run start

The server runs on port 9001 with CORS enabled.

See the plugin development section in Console Dynamic Plugins README for details on how to run OpenShift console using local plugins.

When a local console server is running, visit http://localhost:9000/example to see the example plugin page.

Deployment on cluster

You can deploy the plugin to a cluster by applying manifest.yaml.

oc apply -f manifest.yaml

Once deployed, patch the Console operator config to enable the plugin.

oc patch consoles.operator.openshift.io cluster --patch '{ "spec": { "plugins": ["$PLUGIN_NAME"] } }' --type=merge

Docker image

  1. Build the image:

    docker build -t quay.io/$USER/$PLUGIN_NAME:latest .
    
  2. Run the image:

    docker run -it --rm -d -p 9001:80 quay.io/$USER/$PLUGIN_NAME:latest
    
  3. Push the image to image registry:

    docker push quay.io/$USER/$PLUGIN_NAME:latest
    

References