-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
Panic when creating Config object with Azure provider #238
Comments
So this is a failure in https://github.com/clux/kube-rs/blob/master/kube/src/config/file_config.rs#L171 , presumably it's because you have an access token without expiry. Is that correct? I thought the expiry was mandatory. But haven't checked with gcp myself. Haven't got time to dig into this right now, looks like maybe #84 has related info? |
The auth block and access token do have an expiry on them - I've included a sanitized snippet below of the auth info from the config. I think what's holding everything up might be: https://github.com/clux/kube-rs/blob/2e2f51a5ee2b2201a3d957febf9cc20ece5d27fd/kube/src/config/file_config.rs#L174 I'm getting a completely filled out AuthInfo struct and it's correctly parsing everything from the YAML, but I think it's rolling over since it's assuming a GCP access token, and this one has been issued via Azure Active Directory for the AKS cluster in question. users:
- name: *appropriate-user-name-for-cluster-user*
user:
auth-provider:
config:
access-token: *access-token-snipped, was present and valid as of post time*
apiserver-id: *apiserver-id-snipped*
client-id: *client-id-value-snipped*
config-mode: "1"
environment: AzurePublicCloud
expires-in: "3599"
expires-on: "1587508258"
refresh-token: *refresh-token-snipped, value present*
tenant-id: *azure-tenant-id-was-here*
name: azure I'm trying to dig around a bit and see what exactly kubectl is doing when it would make these auth calls - if I can get it narrowed down quickly, I'm up for PR'ing the Azure flow back in if it's beneficial. |
Whenever I attempt to create a Config object (either via
Config::infer()
orConfig::from_custom_kubeconfig()
, I end up with the following output (full backtrace included).It looks like the call to
load_gcp
is the last notable one before the unwind starts. The config I'm attempting to load (all of them, actually), are running Kube 1.16.7 in Azure AKS - the clusters are linked to AD.I will work on getting better reproduction steps, but for now it seems to be loading a Kube config with a Azure data in the parsed AuthInfo.
Output and backtrace
Cargo.toml
The text was updated successfully, but these errors were encountered: