Coder Social home page Coder Social logo

Comments (27)

alebcay avatar alebcay commented on June 22, 2024 38

In a pinch, I've managed to separate out the extensions from 6.2.6 into https://github.com/alebcay/openlens-extensions. Needed a few adjustments to get it to build correctly outside of the Lens tree. For myself at least, so far it is working fine with 6.3.0.

It's getting late so I don't have any ready-to-use downloads up but there's instructions in there on how to use this with your local installation of OpenLens.

Open to moving this into an org if there are more people interested in maintaining it. Thankfully, most of the nitty gritty bits (e.g. creating a terminal window) are abstracted into Lens' extension API, so the actual extensions themselves are pretty lightweight.

from openlens.

alebcay avatar alebcay commented on June 22, 2024 36

Based on feedback in this thread, sounds like only the node-menu and pod-menu extensions are really needed - the other two are now baked into OpenLens itself. If this isn't the case, we can pull those other two extensions out into another repo and maintain them separately.

I have renamed my repository to https://github.com/alebcay/openlens-node-pod-menu. It now only contains the functionality for node-menu and pod-menu, combined into a single extension.

The README in that repo still reflects how to build and use it from source locally, but you can also simply type @alebcay/openlens-node-pod-menu into the Extensions UI in OpenLens and it should install automatically now from https://www.npmjs.com/package/@alebcay/openlens-node-pod-menu.

from openlens.

onedr0p avatar onedr0p commented on June 22, 2024 8

@sanarena this repo isn't a fork it just builds Lens without the auth requirement. But maybe it's time for someone to fork Lens properly.

from openlens.

gdlx avatar gdlx commented on June 22, 2024 1

@sanarena this repo isn't a fork it just builds Lens without the auth requirement. But maybe it's time for someone to fork Lens properly.

This repo actually builds and packages OpenLens so, patching to restore in-tree extensions, or include external extensions into the package could be acceptable.

Forking and maintaining the whole Lens repo would be another kind of story...

We may also ask AWS/Azure to buy Mirantis and release Lens for free 😋

from openlens.

gdlx avatar gdlx commented on June 22, 2024 1

@alebcay Here is the events new feature: lensapp/lens#6468
I'm not sure there is a relation between it and the events extension (I'd need to build 6.2.5 without the events extension to confirm...) but 6.3.0 without the extension clearly works as expected.

from openlens.

alebcay avatar alebcay commented on June 22, 2024 1

Can we get updates for these extensions in future, or sources are closed from now on?

Based on lensapp/lens#6823 (comment), it sounds like the latest version of Lens Desktop is still based on 6.2.x, even though it was released after 6.3.0 was tagged. It seems that Mirantis has not yet released a version of Lens Desktop based on 6.3.0 in which these features have been removed from the core app codebase. So the future of where the code for this feature will live, even in the proprietary version, has not yet been decided.

From a code perspective, most of the extension's functionality (e.g. opening a terminal tab, adding a button to the drop down menu, adding the attach/logs/exec icons to the details pane) are all provided by the Lens extensions API itself.

While this functionality could certainly change in the future, I don't see it going away in the API, since it would heavily impact any extensions that want to use these UI features. If Mirantis wants to have any hope of incentivizing anyone (vendors or OSS community) to build extensions on their platform, they're going to need to have some amount of API stability.

Maybe we can make these default installed and somehow add it to workflow so ppl wont have to install manually?

I don't see any obvious way to do this. There appears to be code that facilitates loading bundled extensions but not really any documentation or examples of where/how to add bundled extensions. I've opened lensapp/lens#6855 to request that this information be made available and preferably documented.

from openlens.

qkflies avatar qkflies commented on June 22, 2024 1

@alebcay Hey, noticed that the changes implemented in lensapp/lens#7359 (which closed your initial inquiry lensapp/lens#6855) have now been released in stable OpenLens v6.5.0.

Have tried building from the source repository by adding your npm module @alebcay/openlens-node-pod-menu to the dependencies section as demonstrated in this part of the MR, but it doesn't seem to actually bundle the extension.

# snippet starts Line 179: https://github.com/lensapp/lens/blob/79e4eaa39461488bea3a3d9e872d12ce94e09662/open-lens/package.json#L179
"dependencies": {
    "@alebcay/openlens-node-pod-menu": "0.1.0",
    "@astronautlabs/jsonpath": "^1.1.0",
    "@hapi/call": "^9.0.1",
    ...
}

Any thoughts on what other changes might need to be made to bundle your extension into the built app? Thanks in advance for your consideration.

from openlens.

gdlx avatar gdlx commented on June 22, 2024

The easiest may be to revert the commits that remove the in-tree extensions. But that may eventually be hard to maintain.
The cleanest would be to include them as external extensions, that should be maintained on their own repos...

from openlens.

sanarena avatar sanarena commented on June 22, 2024

I was looking at how they removed it. They removed extensions folder. and changed packages.json to load extensions
Maybe if we checkout extensions folder from tag v6.2.5 into current release and add missing codes in package.json to latest version package.json files via pipeline, we can have those extensions back?

from openlens.

jkroepke avatar jkroepke commented on June 22, 2024

I had the same idea. Pretty sure. lens will change the extension API just to make the old extensions non compatible.

Since this repository is not going to modify the source code, I personally prefer out of tree extensions, instead keeping them in-tree.

The current solution is to stay on 6.2.x and hope for a fork or complete Alternative solutions. Its basic a cat and mouse game now that the free version always lose.

from openlens.

gdlx avatar gdlx commented on June 22, 2024

One could actually just fork the missing extensions into distinct repos, that could be packaged here. I could take a look if it isn't much more than copy/paste/config but I'm no JS developer so I won't maintain the code.

I don't think they will break the extension API soon as there are other existing extensions and dropping them would push more users out of Lens.

from openlens.

jkroepke avatar jkroepke commented on June 22, 2024

@MuhammedKalkan Do you want to create an an org, like openlens-distribution?

from openlens.

gdlx avatar gdlx commented on June 22, 2024

@alebcay I just tested the pod menu extension and it works fine with 6.3.0, thanks !

I can't try node menu as I can't directly connect to my nodes but the button is there and it tries to connect...

Not sure if the 2 other ones are useful as I have events on all objects (it's a 6.3.0 new feature) and cluster metrics with or without the respective extensions...

from openlens.

alebcay avatar alebcay commented on June 22, 2024

Thanks for giving it a try. I'm not sure about the other two extensions either since I really only use the pod/node menus. Didn't realize they added the events as a new feature. I just included everything from the extensions folder, those two might not be needed I guess.

from openlens.

EvertonSA avatar EvertonSA commented on June 22, 2024

I tried adding code on v6.2.5 to master HEAD (v6.4.0) and it breaks very ugly. I think there are no reasonable workarounds besides use v6.2.5 or wait until they are listed here https://github.com/lensapp/lens-extensions

from openlens.

alebcay avatar alebcay commented on June 22, 2024

I tried adding code on v6.2.5 to master HEAD (v6.4.0) and it breaks very ugly. I think there are no reasonable workarounds besides use v6.2.5 or wait until they are listed here lensapp/lens-extensions

I was also able to get the pod/node menus back in current 6.4.0-alpha.0 (HEAD at lensapp/lens@e59ec3a) as built-in rather than out-of-tree extensions. See commits:

Even so, this approach is definitely messier and will get even messier in the long run. Building and maintaining the extensions separately is probably the easier way for now.

from openlens.

marafa-sugarcrm avatar marafa-sugarcrm commented on June 22, 2024

@alebcay - i thank you for your efforts to help the community. i will be (im)patiently waiting for you to build releases so i can use them from within openlens

from openlens.

marafa-sugarcrm avatar marafa-sugarcrm commented on June 22, 2024

The README in that repo still reflects how to build and use it from source locally, but you can also simply type @alebcay/openlens-node-pod-menu into the Extensions UI in OpenLens and it should install automatically now from https://www.npmjs.com/package/@alebcay/openlens-node-pod-menu.

@alebcay THANK YOU! - can you also add that to the readme?
@MuhammedKalkan - the readme here should also either point to the extensions repo or have that ^^ line added. both would be best. again thank you

from openlens.

MuhammedKalkan avatar MuhammedKalkan commented on June 22, 2024

@marafa-sugarcrm done.
@alebcay Can we get updates for these extensions in future, or sources are closed from now on? Maybe we can make these default installed and somehow add it to workflow so ppl wont have to install manually?

@jkroepke we can but i am worried about something. Lens team plans to make openlens an npm package and already started to rip things apart. This repo never meant to be a complete fork and it seems things are heading that way.

from openlens.

MuhammedKalkan avatar MuhammedKalkan commented on June 22, 2024

Ok we will wait and see then. Closing this one, since the solution seems fine for now. Feel free to open another if something comes up

from openlens.

dhdnicodemus avatar dhdnicodemus commented on June 22, 2024

I tried install the extension, I still don't see these menus, especially missing pod logs and exec. MacOS 6.3.0
Do I need to do something else to enable this?

from openlens.

cloud-versity avatar cloud-versity commented on June 22, 2024

I tried install the extension, I still don't see these menus, especially missing pod logs and exec. MacOS 6.3.0 Do I need to do something else to enable this?

Running MacOS Ventura and 6.4.0 alpha and I can confirm that it still works.

from openlens.

dhdnicodemus avatar dhdnicodemus commented on June 22, 2024

It appears the the Extension install failed or got stuck, the dist directory was never isntalled into the .k8lens folder, so I ended up copying that by hand and it worked after that.

from openlens.

azelezni avatar azelezni commented on June 22, 2024

Amazing, even after breaking away from lensapp/lens, they still manage to make everyone's life harder.
For reference, the latest "working" version is 6.2.5

from openlens.

arcreative avatar arcreative commented on June 22, 2024

@azelezni did you read above for the solution, or are you just here to complain?

from openlens.

alebcay avatar alebcay commented on June 22, 2024

I've given it a try on my local machine and haven't gotten it to be able to be bundled either. Not sure what other steps might be needed to get it to work.

Maybe it's worth trying with another extension and seeing if that works? Hoping that would help establish whether it's something weird about this particular extension or if it's a matter of some requirement that the Lens folks have not documented adequately (or is lost somewhere in that PR and hard to notice).

from openlens.

qkflies avatar qkflies commented on June 22, 2024

I threw a bunch of extensions in there (including one of Mirantis' first party), and none of them made it along for the ride. So, back to asking them what else is needed to make it bundle.

# plugins added to the dependency section of `open-lens/package.json`
"@alebcay/openlens-node-pod-menu": "0.1.0",
"@andrea-falco/lens-multi-pod-logs": "0.3.1",
"@kubescape/lens-extension": "0.2.4",
"@mirantis/lens-extension-cc": "5.6.0",
"@ottimis/lens-version-update": "1.2.0",
"lens-certificate-info": "3.0.1",
"lens-extension-network-policy-viewer": "3.0.0"

I will say that it's particularly galling that the legacy-extension-sample consistently makes it, but nothing else that is injected does 😅.

from openlens.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.