Nenhuma descrição

Samuel Padgett e9fb978540 initial commit 4 anos atrás
src e9fb978540 initial commit 4 anos atrás
.eslintrc.yml e9fb978540 initial commit 4 anos atrás
.gitignore e9fb978540 initial commit 4 anos atrás
.prettierrc.yml e9fb978540 initial commit 4 anos atrás
Dockerfile e9fb978540 initial commit 4 anos atrás
LICENSE e9fb978540 initial commit 4 anos atrás
README.md e9fb978540 initial commit 4 anos atrás
console-extensions.json e9fb978540 initial commit 4 anos atrás
manifest.yaml e9fb978540 initial commit 4 anos atrás
package.json e9fb978540 initial commit 4 anos atrás
tsconfig.json e9fb978540 initial commit 4 anos atrás
webpack.config.ts e9fb978540 initial commit 4 anos atrás
yarn.lock e9fb978540 initial commit 4 anos atrás

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