Skip to content

Latest commit

 

History

History
112 lines (70 loc) · 5.16 KB

README.md

File metadata and controls

112 lines (70 loc) · 5.16 KB

E2E

Kubewarden UI

This is an extension for Rancher Manager (v2.7.0) which allows you to interact with Kubewarden.

View the Rancher UI Extension documentation for more in-depth info on how to use the UI. Visit the Kubewarden docs for more insight on how to use Kubewarden.

Installation

This extension requires a Rancher version of v2.7.0 or later, you can find the latest releases here.

The official Rancher documentation has an extensive walkthrough on how to install an Extension. However, there are multiple ways of installing the Kubewarden Extension:

  • Installing the Helm chart housed in the Rancher Extension Repository (Described in the Rancher docs)
  • Installing the Helm chart within this repository (This method allows installing all Release Candidate builds)
  • Deploying the Extension Catalog Image to mirror a Helm repository (Necessary for Air-Gapped clusters)

Installing from the Kubewarden/UI repository

  1. Navigate to the Extensions page from the side-nav and Enable the Extension support without adding the Rancher Extension Repository.
  2. Once the Extension Operator has been installed click on the Action Menu in the top right of the screen and select "Manage Repositories".
  3. Create a new Helm repository with the "Target" as a https URL pointing to the published domain for the UI Github Repository:
https://rancher.github.io/kubewarden-ui/
  1. Navigate back to the extensions screen and a card for Kubewarden should appear with available options for versions to install.

Deploying the Extension Catalog Image

This requires a Rancher Manager version of v2.7.5 or greater

The Extension Catalog Image (ECI) is comprised of a hardened SLE BCI image running an NGINX service which supplies the Helm charts as well as the minified extension files.More information can be found here.

Released ECIs for Kubewarden can be found within the packages of the UI repository. You will be able to deploy the ECI either from ghcr.io (e.g. ghcr.io/kubewarden/kubewarden-ui:1.1.0) or by mirroring the image into a registry that is accessible to the Rancher cluster.

Mirror the ECI into a Private Registry

  1. Pull the image.
docker pull ghcr.io/kubewarden/kubewarden-ui:1.1.0
  1. Tag the image with the registry name
docker tag ghcr.io/kubewarden/kubewarden-ui:1.1.0 my-registry.com/kubewarden/kubewarden-ui:1.1.0
  1. Push the image to the registry
docker push my-registry.com/kubewarden/kubewarden-ui:1.1.0

Deploy the ECI from the UI:

Any Authentication needed for the registry MUST be created as a secret under the cattle-ui-plugin-system namespace.

  1. Navigate to the Extensions page from the side-nav and Enable the Extension.
  2. Once the Extension Operator has been installed click on the Action Menu in the top right of the screen and select "Manage Extension Catalogs".
  3. Click on the "Import Extension Catalog" button to open the dialog.
  4. Input the ECI reference including the version number into the "Catalog Image Reference" input.
  5. Select any "Pull Secrets" necessary for the ECI to be pulled.
  6. Once imported navigate back to the main Extensions and install Kubewarden extension as normal.

A more in-depth guide on importing an Extension Catalog Image can be found in the Rancher Dashboard documentation.

Developing

You will need to point the UI to a running instance of Rancher, here's a quickstart guide for setting up Rancher in a Docker container.

Run the dev environment

  1. From the root directory, install the packages.
yarn install
  1. Run the dashboard locally.
API=https://<rancher-host> yarn dev

To test the build

  1. Build the plugin.
yarn build-pkg kubewarden
  1. In another terminal, serve the package.
yarn serve-pkgs kubewarden
  1. Run the dashboard locally.
API=https://<rancher-host> yarn dev

Once your environment is running you will be able to load the plugin by navigating to the Extensions page from the Side Nav.

  1. Load the plugin by choosing the "Developer Load" option from the Action Menu (3 dots), then inputing the provided url from the serve-pkgs command into the Extension URL input.