Skip to content

Update Kubernetes client-go #2816

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

Merged
merged 7 commits into from
Jan 11, 2021
Merged

Conversation

csweichel
Copy link
Contributor

This PR updates the Kubernetes client-go version to v1.20.1 thereby fixing #2689 .
The biggest change is the introduction of context.Context in all Kubernetes API calls. I've followed this strategy while choosing a good context:

  • if a context is available already (e.g. because of the original request), use that one
  • if we cannot sensibly decide on timeouting/cancelation, add a ctx context.Context to the functions parameters (e.g. workspaceExists, getWorkspaceObjects)
  • if the operation happens as part of a reoccurring task, use a default timeout (5 seconds)
  • if the operation happens as part of CLI or testing, use context.Background()

It also removes the PodIPSource and ServiceIPSource from ws-daemon. Those two are no longer needed as we've settled on deploying registry-facade as daemonSet.

How to test

  1. interact with Gitpod, start a workspace, stop it, open ports.
  2. Run the integration tests (cd test/tests && go test -v ./...)

Copy link
Contributor

@corneliusludmann corneliusludmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good. Workspaces are still starting. 👍

@csweichel csweichel merged commit b7d7433 into master Jan 11, 2021
@csweichel csweichel deleted the csweichel/update-kubernetes-client-2689 branch January 11, 2021 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants