-
Notifications
You must be signed in to change notification settings - Fork 271
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
Is it possible to bring back Logs/Exec into node/pod buttons? #83
Comments
The easiest may be to revert the commits that remove the in-tree extensions. But that may eventually be hard to maintain. |
@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 😋 |
I was looking at how they removed it. They removed extensions folder. and changed packages.json to load extensions |
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. |
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. |
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. |
@MuhammedKalkan Do you want to create an an org, like openlens-distribution? |
@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... |
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. |
@alebcay Here is the events new feature: lensapp/lens#6468 |
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 |
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. |
@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 |
Based on feedback in this thread, sounds like only the I have renamed my repository to https://github.com/alebcay/openlens-node-pod-menu. It now only contains the functionality for The README in that repo still reflects how to build and use it from source locally, but you can also simply type |
@alebcay THANK YOU! - can you also add that to the readme? |
@marafa-sugarcrm done. @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. |
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.
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. |
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 |
I tried install the extension, I still don't see these menus, especially missing pod logs and exec. MacOS 6.3.0 |
Running MacOS Ventura and 6.4.0 alpha and I can confirm that it still works. |
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. |
Amazing, even after breaking away from lensapp/lens, they still manage to make everyone's life harder. |
@azelezni did you read above for the solution, or are you just here to complain? |
@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 # 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. |
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). |
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 |
Looking at OpenLens latest version here, lensapp/lens#6823 (comment), they've removed extension responsible for those buttons.
Is there anyway for us to bring them back into this fork? for example in pipeline, before building the binaries, add back the extension (possible?) and then build the binaries.
The text was updated successfully, but these errors were encountered: