-
Notifications
You must be signed in to change notification settings - Fork 59
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
Allow to specify the kubernetes context #175
Comments
We should be able to add something. It connects well with work we're doing on tool configuration right now (specifically how do you configure tools that require parameters or credentials to work, like pulling data from Grafana cloud or Elasticsearch?) Would you be open to a short video chat so I can better understand your requirements and verify the solution works? |
For me this is a must feature. I use holmesgpt from k9s and if the context I'm using inside of k9s is different than the context in zsh(before starting k9s) then shift+h(ask holmesgpt) will not work and will say the namespace or resource does not exist but if holmes worked in the context of k9s then it will work as expected. |
Hi @Hax7, thanks for chiming in. I think we'll be able to support this properly soon. Until then, could something like this be a workaround? |
I don't this "workaround" is related to this case, when 'holmes ask' command is executed from k9s it works on the current-context in the shell not the current context inside k9s. I use kubectx outside of k9s and it works fine so the alias you referred to is not gonna change anything here. I also tried this "holmes ask "why is $NAME of $RESOURCE_NAME in -n $NAMESPACE in --context CONTEXT_NAME not working as expected" but it ignores the --context here for some reason when holmes executs the kubectl command |
Got it, thanks. To elaborate on why this doesn't work, HolmesGPT runs commands according to permitted templates. So to fix this you can patch the templates it uses for kubectl commands and reinstall holmes from source with those changes. But we're looking into some proper fixes that make this easier to do + a k9s specific fix that we can get to you fast. |
It would be nice to add support for the
--context
argument when holmes is executing thekubectl
command. This will allow to run holmes without having to change contextThe text was updated successfully, but these errors were encountered: