-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README and remove feature gates related to protocol request support once it lands in Lens #25
Comments
lensapp/lens#1288 will be in Lens 4.2 🎉 |
README content to add to "Help" section: ### Supported protocol requests
[Lens 4.2](https://medium.com/k8slens/lens-4-2-released-f1c3268d3f95) introduced a new __custom Lens protocol handler__. This means Lens can now respond to `lens://` URL requests made in the browser, and this extension can now support some interesting requests that enable tighter integration between Mirantis Container Cloud instances and Lens.
> Note that this integration is a one-way street: Container Cloud -> Lens. It does not work the other way around. _Reverse_ integration is achieved simply by making Container Cloud API requests from Lens, which is much easier to achieve, and has been used by this extension since its inception.
The __base URL__ for requests that this extension can respond to is:
```
lens://extensions/@mirantis/lens-extension-cc
```
The following APIs are currently supported by this extension, from the base URL above:
#### Activate cluster
Activates a cluster __already added__ to Lens.
```
GET /activateCluster
?cloudUrl={string}
&namespace={string}
&clusterName={string}
&clusterId={string}
```
- `cloudUrl`: URL to the instance, e.g. `https://container-cloud.my-company.com`
- `namespace`: ID of the Container Cloud namespace containing the cluster to activate.
- `clusterName`: Name of the cluster to activate.
- `clusterId`: ID of the cluster (in `namespace`) to activate.
#### Add one cluster
Adds a __single__ cluster to Lens (if it hasn't already been added) by providing a pre-configured kubeConfig JSON object for the cluster. As such, this endpoint does not require the extension to perform any authentication/authorization requests. It simply stores the kubeConfig on disk and tells Lens where to find it.
```
GET /kubeConfig
?cloudUrl={string}
&namespace={string}
&clusterName={string}
&clusterId={string}
&kubeConfig={string}
```
- `cloudUrl`: URL to the instance, e.g. `https://container-cloud.my-company.com`
- `namespace`: ID of the Container Cloud namespace containing the cluster to activate.
- `clusterName`: Name of the cluster to activate.
- `clusterId`: ID of the cluster (in `namespace`) to activate.
- `kubeConfig`: JSON-stringified, Base64-encoded kubeConfig payload.
#### Add multiple clusters
Allows the user to add __one or more__ clusters to Lens by telling the extension where to find them. Unlike [adding one cluster](#add-one-cluster), it does not automatically add any clusters to Lens. It simply triggers the extension to immediately list all available clusters, and then lets the user choose which ones to add.
```
GET /addClusters
?cloudUrl={string}
&username={string}
&tokens={string}
[ &keycloakLogin={boolean} ]
[ &namespaces={string} ]
```
- `cloudUrl`: URL to the instance, e.g. `https://container-cloud.my-company.com`
- `username`: Username associated with the `tokens`.
- `tokens`: JSON-stringified, Base64-encoded OAuth2 tokens for the user.
- `keycloakLogin` (Optional): `false` (default) if the instance in `cloudUrl` uses basic (username/password) authentication; `true` if the instance in `cloudUrl` uses SSO authorization.
- `namespaces` (Optional): Comma-delimited list of namespace IDs to restrict the list of clusters presented by the extension (i.e. a filter on namespaces). Only clusters in these namespaces will be listed. |
stefcameron
added a commit
that referenced
this issue
Apr 30, 2021
stefcameron
added a commit
that referenced
this issue
Apr 30, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the Lens issue tracking implementation: lensapp/lens#1288
Search the code for this issue here to find the places where things need a bit of refactoring to be made more "official".
For now, the feature gates should(tm) start working once Lens supports the feature.
The text was updated successfully, but these errors were encountered: