Sin descripción

Samuel Padgett e9fb978540 initial commit hace 4 años
src e9fb978540 initial commit hace 4 años
.eslintrc.yml e9fb978540 initial commit hace 4 años
.gitignore e9fb978540 initial commit hace 4 años
.prettierrc.yml e9fb978540 initial commit hace 4 años
Dockerfile e9fb978540 initial commit hace 4 años
LICENSE e9fb978540 initial commit hace 4 años
README.md e9fb978540 initial commit hace 4 años
console-extensions.json e9fb978540 initial commit hace 4 años
manifest.yaml e9fb978540 initial commit hace 4 años
package.json e9fb978540 initial commit hace 4 años
tsconfig.json e9fb978540 initial commit hace 4 años
webpack.config.ts e9fb978540 initial commit hace 4 años
yarn.lock e9fb978540 initial commit hace 4 años

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