Skip to content

Conversation

@Callum0x50
Copy link
Member

This PR adds commands that allow users to login to their clusters by running indev cluster login <clusterName>
Also adds a command to open the openshift console in a browser window by running indev cluster open <clusterName>

While this branch is entirely functional, I'm unsure how I feel about wrapping oc. This obviously puts a requirement for an external binary to be present for these commands to work, and we're also doing os/exec to run the oc commands which I feel a bit uncomfortable doing.

As alternative options I have looked into using the oc or kubectl libraries as an SDK instead, but these both come with big trade-offs and introduce a lot of extra code complexity that I would rather avoid.

Going to have to think this one through and gather some opinions from others before moving on.

@Callum0x50 Callum0x50 linked an issue Dec 18, 2025 that may be closed by this pull request
@stianfro
Copy link
Member

+1 from me

imo the practical merit outweighs the negatives (said from the perspective of someone who will not maintain the feature)

@JonasKs
Copy link
Member

JonasKs commented Dec 19, 2025

I tested it locally, and it works great!
The implementation is maybe as beautiful as you'd like it, but the code is easy to read and reason about. I vote for a quick merge!!

@M99
Copy link

M99 commented Dec 19, 2025

Send it! oc is already a requirement if someone wishes to log into their cluster via CLI, so wrapping it is a non-issue in my opinion 🚀

@Callum0x50 Callum0x50 marked this pull request as ready for review December 19, 2025 13:04
@Callum0x50 Callum0x50 merged commit 77c4f8d into main Dec 19, 2025
3 checks passed
@Callum0x50 Callum0x50 deleted the feat/cluster-login branch December 19, 2025 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add shortcut to login to cluster

5 participants