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

Recreate k8s client on auth failure #215

Merged
merged 5 commits into from
Sep 22, 2018

Conversation

richardsliu
Copy link
Contributor

@richardsliu richardsliu commented Sep 21, 2018

This is a work around for kubernetes-client/python-base#59

There is a bug in the python K8s client preventing GCP auth tokens from being refreshed when they expire.

  • As a result our E2E tests fail waiting for workflows that take more than an hour. In this case, the OAuth token expires so the requests to get workspace status fail with unauthorized

see
#207 - Argo client should refresh credentials if OAuth token expires
#204 - argo_client doesn't handle retries correctly.

This change is Reviewable

@richardsliu
Copy link
Contributor Author

/retest

@richardsliu
Copy link
Contributor Author

/test all

@richardsliu
Copy link
Contributor Author

/assign @jlewi
The workaround is to (1) refresh kube config, and (2) make sure the k8s api client is recreated. For the short term fix, I'm simply recreating the client on each k8s API call.

@jlewi
Copy link
Contributor

jlewi commented Sep 22, 2018

Thanks so much.

/lgtm
/approve

Just a reminder please provide informative PR descriptions with links to appropriate issues. I went ahead and updated the PR description.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jlewi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 029a9d0 into kubeflow:master Sep 22, 2018
@richardsliu richardsliu deleted the k8s_client branch September 23, 2018 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants