Dentrax / kubesql

Experimental tool to query K8s API using plain SQL
186 stars 11 forks source link

Add Azure AKS support #1

Open velvia opened 3 years ago

velvia commented 3 years ago

This is an awesome project! Would love if azure support could be added. If I had lots of time could potentially help here.

thread 'main' panicked at 'an error occurred during creating kube client: failed to create the kube client with context

Caused by:
    0: Error loading kubeconfig: Failed exec auth: Authentication with provider azure not supported
    1: Failed exec auth: Authentication with provider azure not supported

Stack backtrace:
   0: std::backtrace_rs::backtrace::libunwind::trace
             at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
      std::backtrace_rs::backtrace::trace_unsynchronized
             at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
      std::backtrace::Backtrace::create
             at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/backtrace.rs:327:13
   1: std::backtrace::Backtrace::capture
             at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/backtrace.rs:295:9
   2: kubesql::main::{{closure}}
   3: tokio::park::thread::CachedParkThread::block_on
   4: tokio::runtime::thread_pool::ThreadPool::block_on
   5: tokio::runtime::Runtime::block_on
   6: kubesql::main
   7: std::sys_common::backtrace::__rust_begin_short_backtrace
   8: std::rt::lang_start::{{closure}}
   9: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/core/src/ops/function.rs:259:13
      std::panicking::try::do_call
             at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panicking.rs:379:40
      std::panicking::try
Dentrax commented 3 years ago

Hey @velvia, I'm glad you like it. I think It is a known issue of the underlying lib used to communicate with K8s. Could you please check this issue out? https://github.com/clux/kube-rs/issues/238

velvia commented 3 years ago

Hmmm… it’s not clear to me, that issue was closed, does it mean it is now resolved?

On Apr 18, 2021, at 11:41 PM, Furkan Türkal @.***> wrote:

Hey @velvia https://github.com/velvia, I'm glad you like it. I think It is a known issue of the underlying lib used to communicate with K8s. Could you please check this issue out? clux/kube-rs#238 https://github.com/clux/kube-rs/issues/238 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Dentrax/kubesql/issues/1#issuecomment-822212885, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDPW2YLNQBI2VMFTLSZ5LTJPGBNANCNFSM43E2GZGA.

Dentrax commented 3 years ago

I'm not sure exactly, but maybe you did misconfigure your kubeconfig?

velvia commented 3 years ago

No it’s not the kubeconfig, the exception clearly states that azure authentication is not yet supported.

On Apr 19, 2021, at 6:42 AM, Furkan Türkal @.***> wrote:

I'm not sure exactly, but maybe you did misconfigure your kubeconfig?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Dentrax/kubesql/issues/1#issuecomment-822476190, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDPW6XEWV6HALX7D2Q6JDTJQXMBANCNFSM43E2GZGA.

Dentrax commented 3 years ago

Hey @clux, sorry for pinging, have you any ideas here? Azure auth method is falling this line, I guess. Have you any idea why azure is commented out?

clux commented 3 years ago

Ah, I think that might be due to a bigger refactor around oauth, sorry :(

We never technically implemented the auth providers right until recently, but I guess it kind of worked anyway. I have opened an issue on our end. Thanks for the heads up.

You can bypass oauth flow by doing service-account style auth. Maybe that's why people have not complained before :thinking: