-
Notifications
You must be signed in to change notification settings - Fork 185
Buggy conditional in kube_config.py (TypeError: '<' not supported between instances of 'int' and 'time.struct_time') #84
Comments
This fix (and the original behavior as well) causes issues for me. My assumption is the date format when the kubeconfig is accessed by Windows as well, since I'm running on Windows Subsystem for Linux and use a mounted file as Kubeconfig?
|
Hi, |
I also have the same error with AKS integrated with AAD. Any updates on how to resolve this? Thanks! |
I'm seeing the same issue as @sdktr with the |
The problem is that expires-on is sometimes an integer (time after epoch?) and sometimes a datestring in %Y-%m-%d %H:%M:%S.%f format. I believe this is the solution that is needed to fit both cases
|
Can @richard-reece and @wunzeco confirm that this works for both use cases? |
Looks good to me, thanks! And indeed during my testing it was sometimes an epoch integer. Yay. |
Looks good to me too. Awesome! |
after further discussion with @wunzeco I'm going to raise this as a separate PR |
I'm encountering the same issue. Seems when kubectl is initially getting the config, expires-on is an integer, which is ok. But when _refresh_azure_token is called from site-packages/kubernetes/config/kube_config.py the refreshed token will return a timestamp like '2019-04-25 11:41:40.204877'. And the 2nd time you call the module, it fails. |
@Sephtex I just encountered the same thing. If you update [edit] |
Thanks , this worked for me too. Implemented this fix via monkey patching |
Facing the same issue, waiting for the fix to merge |
I use AKS with AAD authentication and I have the same issue. The fix is working for me. |
same issue |
The same issue with kubernetes 10.0.1 |
Same for me. Fix if I force the version to 11.0.0b2 |
python-base/config/kube_config.py
Line 211 in d68e456
The line above fails with the error:
Suggested fix:
The text was updated successfully, but these errors were encountered: