This Lens Extension adds a status bar item, and a menu item, that makes it easy to connect Lens to a Mirantis Container Cloud instance and add its clusters to Lens.
âšī¸ Requires Lens >= 4.0.6
.
These instructions will help you install the extension for direct use with Lens. Follow the development instructions below if you intend to work on the extension to improve it.
NPM 6 or later is required to use the npm pack command.
Until this Lens issue is fixed, the extension's tarball (a compressed .tgz
file) must first be downloaded to your local system:
# download tar file without installing it
$ npm pack @mirantis/lens-extension-cc
This will download a file named like mirantis-lens-extension-cc-X.Y.Z.tgz
to the current directory.
Start Lens and go to the Extensions View (CMD+SHIFT+E
on macOS). Use the file picker to find the tarball you just downloaded. This will install and enable the extension in Lens.
You should now be able to choose the new File > Add Cloud Clusters
menu item, or click on the Mirantis Container Cloud
status bar icon (far right side of the status bar at the bottom of the app), to get started.
To upgrade to a newer release, go to the Extensions View (CMD+SHIFT+E
on macOS), uninstall the extension, and then re-install it again.
Yarn 1.x is required
First, quit Lens if it's currently running.
Then, clone the repository wherever you prefer to have your code, and then link to it:
$ git clone https://github.com/Mirantis/lens-extension-cc.git /your/src/path
$ mkdir -p ~/.k8slens/extensions
$ ln -s /your/src/path ~/.k8slens/extensions/lens-extension-cc
$ cd /your/src/path
$ yarn # install dependencies
$ yarn start # start dev build in watch mode
This will put the development build into watch mode.
Restart Lens and go to the Extensions View (CMD+SHIFT+E
on macOS) to enable it, which will cause it to load for the first time.
Now, as you make source changes, the build will run, and all you need to do is reload the Lens window (CMD+R
on macOS) to see your changes.
You can also run a one-off development build with yarn dev
.
Note these steps will get much easier once this Lens issue is fixed.
Go to the Lens Extensions View (CMD+SHIFT+E
on macOS) and use the UI to uninstall it.
If you followed the development instructions, this will just remove the symlink you created in ~/.k8slens/extensions
and leave your linked directory intact.
First, update the CHANGELOG, then use NPM:
$ npm version <patch|minor|major>
$ npm publish --access public # <- NOTE the '--access public' part!
$ git push && git push --tags
By default, packages published to an NPM scope/org are private. Use the
--access public
option to publish it as a public package instead. You can also configure NPM to always publish that single package publicly by runningnpm config set access public
within the repository root directory (i.e. package root).
The prepublishOnly
script will automatically produce a production build in the ./dist
directory, which will be published.
Mirantis Container Cloud instances that use third-party SSO authentication (e.g. Google OAuth) are not supported at this time. We plan on adding support soon.
The extension purposely doesn't not add management clusters to the default/initial set of selected clusters after retrieving clusters from a Mirantis Container Cloud instance because they are typically of less interest than workload clusters.