This project is an OpenShift Console
dynamic plugin that extends the OpenShift UI
with features to manage nfspvc.dana.io
resources.
The plugin introduces a new section in the UI called Storage Automations
, where users can view a list of existing NFSPVCs
and create new ones via a form.
The plugin currently supports 3 OpenShift UI
versions. Charts and images are available at ghcr.io
.
OpenShift 4.12
- underrelease-4.12
branch.OpenShift 4.14
- underrelease-4.14
branch.OpenShift 4.16
- underrelease-4.16
branch.
- New dashboard section: Adds a new section in the dashboard called
Storage Automations
. nfsPVC
list view: Displays a list of existingnfsPVC
resources with details such asname
,namespace
,size
,server
,creation timestamp
, andphases
(pvPhase
andpvcPhase
).nfsPVC
creation form: Provides a form to create newnfsPVC
resources.- Sorting and searching: Ability to sort
nfsPVCs
by different columns and search by name.
You can run the plugin using a local development environment or build an image to deploy it to a cluster.
In one terminal window, run:
yarn install
yarn run start
In another terminal window, run:
oc login
(requires oc CLI and access to an OpenShift cluster)yarn run start-console
(requires Docker or Podman 3.2.0+)
This will run the OpenShift console in a container connected to the cluster you've logged into. The plugin HTTP server runs on port 9001 with CORS enabled. Navigate to http://localhost:9000/k8s/ns/default/nfspvc.dana.io~v1alpha1~NfsPvc to see the running plugin.
You can use Docker Compose with VSCode Remote Containers for easy development. Set up the environment variables in a .dev.env
file:
OC_PLUGIN_NAME=nfspvc-plugin
OC_URL=https://api.example.com:6443
OC_USER=kubeadmin
OC_PASS=<password>
Open the folder in a remote container (Ctrl+Shift+P
-> Remote Containers: Open Folder in Container...
) and run:
yarn run start
Then navigate to http://localhost:9000/k8s/ns/default/nfspvc.dana.io~v1alpha1~NfsPvc.
To deploy the plugin to an OpenShift cluster, build and push the Docker image to an image registry.
-
Build the image:
docker build -t ghcr.io/dana-team/nfspvc-plugin:latest .
-
Push the image to the registry:
docker push ghcr.io/dana-team/nfspvc-plugin:latest
A Helm chart is available to deploy the plugin to an OpenShift environment. The following Helm parameters are required:
plugin.image
: The location of the image containing the plugin.
Install the chart:
helm upgrade -i nfspvc-plugin charts/nfspvc-console-plugin -n nfspvc-plugin --create-namespace --set plugin.image=ghcr.io/dana-team/nfspvc-plugin:latest
Uninstall the chart:
helm uninstall nfspvc-plugin -n nfspvc-plugin
If deploying on OpenShift 4.10, add --set plugin.securityContext.enabled=false
to omit Pod Security settings.
This project uses prettier
, eslint
, and stylelint
for linting and formatting. To run linting checks:
yarn run lint