Skip to content
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

[Task] Update fabric8-client to 5.5.0+ and remove KUBERNETES_AUTH_TRYKUBECONFIG_SYSTEM_PROPERTY #625

Closed
andrewazores opened this issue Aug 5, 2021 · 1 comment · Fixed by #1057
Labels
blocked chore Refactor, rename, cleanup, etc.

Comments

@andrewazores
Copy link
Member

I figured it out. There is an OkHttp Interceptor added in the DefaultOpenShiftClient to retry requests that fail authorization by finding a token or asking the server for a new one:
https://github.com/fabric8io/kubernetes-client/blob/7e747ca61c0097562622eb53b9f008cc6d5e82fb/openshift-client/src/main/java/io/fabric8/openshift/client/internal/OpenShiftOAuthInterceptor.java

There's a special case for RBAC review objects since these can return 200 or 201 even when unauthorized. These are set to always retry. As a consequence, I believe each SelfSubjectAccessReview will be sent twice unfortunately. This request doesn't get resent if there is no username/password or token in the OpenShiftConfig object, which should be the case in our tests, but not in practice.

The difference we're seeing between 5.4.1 and 5.6.0 is due to this PR: fabric8io/kubernetes-client#3158. The test was failing because the OpenShiftClient found a token to use within our ~/.kube/config. If you rename that file, the test will pass.

Originally posted by @ebaron in #599 (comment)

@andrewazores andrewazores added chore Refactor, rename, cleanup, etc. blocked labels Aug 5, 2021
@andrewazores
Copy link
Member Author

Downstream builds currently have 5.4.1 as the latest version, though 5.6.0 is available for upstream. Once 5.5.0+ is available downstream then this issue should be addressed.

@andrewazores andrewazores changed the title Update fabric8-client to 5.5.0+ and remove KUBERNETES_AUTH_TRYKUBECONFIG_SYSTEM_PROPERTY [Task] Update fabric8-client to 5.5.0+ and remove KUBERNETES_AUTH_TRYKUBECONFIG_SYSTEM_PROPERTY May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked chore Refactor, rename, cleanup, etc.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant