|
|
4 rokov pred | |
|---|---|---|
| src | 4 rokov pred | |
| .eslintrc.yml | 4 rokov pred | |
| .gitignore | 4 rokov pred | |
| .prettierrc.yml | 4 rokov pred | |
| Dockerfile | 4 rokov pred | |
| LICENSE | 4 rokov pred | |
| README.md | 4 rokov pred | |
| console-extensions.json | 4 rokov pred | |
| manifest.yaml | 4 rokov pred | |
| package.json | 4 rokov pred | |
| tsconfig.json | 4 rokov pred | |
| webpack.config.ts | 4 rokov pred | |
| yarn.lock | 4 rokov pred |
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:
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.
yarn installyarn run startThe 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.
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
Build the image:
docker build -t quay.io/$USER/$PLUGIN_NAME:latest .
Run the image:
docker run -it --rm -d -p 9001:80 quay.io/$USER/$PLUGIN_NAME:latest
Push the image to image registry:
docker push quay.io/$USER/$PLUGIN_NAME:latest