Тайлбар байхгүй

Samuel Padgett e9fb978540 initial commit 4 жил өмнө
src e9fb978540 initial commit 4 жил өмнө
.eslintrc.yml e9fb978540 initial commit 4 жил өмнө
.gitignore e9fb978540 initial commit 4 жил өмнө
.prettierrc.yml e9fb978540 initial commit 4 жил өмнө
Dockerfile e9fb978540 initial commit 4 жил өмнө
LICENSE e9fb978540 initial commit 4 жил өмнө
README.md e9fb978540 initial commit 4 жил өмнө
console-extensions.json e9fb978540 initial commit 4 жил өмнө
manifest.yaml e9fb978540 initial commit 4 жил өмнө
package.json e9fb978540 initial commit 4 жил өмнө
tsconfig.json e9fb978540 initial commit 4 жил өмнө
webpack.config.ts e9fb978540 initial commit 4 жил өмнө
yarn.lock e9fb978540 initial commit 4 жил өмнө

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