kubeshop / monokle

Monokle is a set of OSS tools designed to help create and maintain high-quality Kubernetes configurations throughout the application lifecycle
https://monokle.io
MIT License
1.66k stars 126 forks source link

Automatically include homebrew paths in default binary path lookup #4223

Open josegonzalez opened 1 month ago

josegonzalez commented 1 month ago

Describe the enhancement you'd like to see

The kubectl tool - and tools kubectl uses to auth into a cluster - are commonly installed via homebrew on MacOS. On the newer ARM architectures, this results in binaries in /opt/homebrew/bin. Monokle looks for binaries in whatever it's default path is, which doesn't include this path, resulting in errors configuring Monokle against a cluster for MacOS ARM users.

22:06:14 - stderr]
/bin/sh: kubectl: command not found\n
[22:06:14 - exit]
Exited with code 127

Additionally, setting a custom path isn't straightforward - the error message doesn't link out to updating the PATH, and the property is hidden behind global settings (which isn't easy to know how to get to at first glance since the settings gear points to cluster settings somehow). Once you set that path, you need to completely restart the app in order to get Monokle to understand that kubectl is in another path and it can retry auth.

Ideally Monokle adds that path by default on MacOS ARM installs, auto-detects changes to the PATH to reload config, and maybe optionally has a "retry auth" button on errors.

Additional context

Discord thread here