You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure, if that's the intended behaviour but presently if I pass --context and that context has a namespace attached to it in my kube config file, I won't be able to tail anything as it won't get the specific namespace of that context, it will set the namespace of the current-context no matter what.
My configuration is something like that:
- context:
cluster: cluster-1.com
namespace: dev
user: user-cluster-1.com
name: dev
- context:
cluster: cluster-2.com
namespace: prod
user: user-cluster-2.com
name: prod
current-context: dev
When running the following with kubetail version 1.6.10
$ kubetail oauth --context prod
returns
No pod exists that matches oauth
However, running
kubetail oauth --context prod -n prod
returns all the logs expected.
I've looked into the script and while I'm not an expert in bash I think it's due to the method calculate_default_namespace() which doesn't get passed the --context option if one is given to the kubetail command, thus, grabbing the namespace of the current-context every time that function is ran.
Happy to help if needed.
The text was updated successfully, but these errors were encountered:
This bothers me too. I simply cleard out namespace_arg on line 55 namespace_arg=""
That way the namespace from the context is used.
The default namespace that is being calculated is also dependent on the namespace for the current context from the config, and there is no guarantee that it will have a namespace attached to it.
Hi there,
Not sure, if that's the intended behaviour but presently if I pass
--context
and that context has a namespace attached to it in my kube config file, I won't be able to tail anything as it won't get the specific namespace of that context, it will set the namespace of thecurrent-context
no matter what.My configuration is something like that:
When running the following with kubetail version 1.6.10
returns
However, running
returns all the logs expected.
I've looked into the script and while I'm not an expert in bash I think it's due to the method
calculate_default_namespace()
which doesn't get passed the--context
option if one is given to thekubetail
command, thus, grabbing the namespace of thecurrent-context
every time that function is ran.Happy to help if needed.
The text was updated successfully, but these errors were encountered: