-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xDS interop: Refresh k8s auth on 401 to pick up updated auth token (#…
…32210) This PR adds retries on create/get requests from the test driver to the K8s API when 401 Unauthorized error is encountered. K8S python library expects the ApiClient to be cycled on auth token refreshes. The problem is described in kubernetes-client/python#741. Currently we don't have any hypotheses why we weren't affected by this problem before. To force the ApiClient to pick up the new credentials, I shut down the current client, create a new one, and replace api_client properties on all k8s APIs we manage. This should also work with the Watch-based log collector recovering from an error. To support that, I replace default Configuration so that the next time Watch creates ApiClient implicitly, the Configuration with updated token will be used.
- Loading branch information
Showing
2 changed files
with
67 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters