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

[dev] Use gke-gcloud-auth-plugin for kubectl #10687

Merged
merged 2 commits into from
Jun 16, 2022
Merged

Conversation

andrew-farries
Copy link
Contributor

@andrew-farries andrew-farries commented Jun 15, 2022

Description

Start using the kubectl auth plugin for GKE.

See https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke

Without this change, attempting to connect to eg the staging cluster with kubectl would print this warning before every command:

W0616 09:45:15.475216   29386 gcp.go:120] WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead.
To learn more, consult https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke

By switching to use the auth plugin this warning goes away.

Related Issue(s)

How to test

  1. Hit the Gitpod button for this PR.
  2. Run gcloud auth login in the new workspace and follow the instructions.
  3. Add a kubecontext for the staging cluster, like gcloud container clusters get-credentials ...
  4. Run kubectl get pods

There should be no warning printed about authentication.

Release Notes

NONE

@andrew-farries andrew-farries changed the title Use gke-gcloud-auth-plugin for kubectl [dev] Use gke-gcloud-auth-plugin for kubectl Jun 15, 2022
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-add-gcloud-auth.1 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-add-gcloud-auth.3 because the annotations in the pull request description changed
(with .werft/ from main)

@andrew-farries
Copy link
Contributor Author

andrew-farries commented Jun 16, 2022

/werft run with-clean-slate-deployment=true

👍 started the job as gitpod-build-af-add-gcloud-auth.4
(with .werft/ from main)

@andrew-farries
Copy link
Contributor Author

andrew-farries commented Jun 16, 2022

/werft run

👍 started the job as gitpod-build-af-add-gcloud-auth.5
(with .werft/ from main)

@github-actions
Copy link
Contributor

⚠️ Hey reviewer! BE CAREFUL ⚠️
Review the code before opening in your Gitpod. .gitpod.yml was changed and it might be harmful.

@roboquat roboquat added size/S and removed size/XS labels Jun 16, 2022
@andrew-farries
Copy link
Contributor Author

andrew-farries commented Jun 16, 2022

/werft run with-clean-slate-deployment=true

👍 started the job as gitpod-build-af-add-gcloud-auth.8
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-add-gcloud-auth.9 because the annotations in the pull request description changed
(with .werft/ from main)

@andrew-farries andrew-farries marked this pull request as ready for review June 16, 2022 09:51
@andrew-farries andrew-farries requested review from a team June 16, 2022 09:51
@github-actions github-actions bot added team: IDE team: devx team: workspace Issue belongs to the Workspace team labels Jun 16, 2022
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-add-gcloud-auth.10 because the annotations in the pull request description changed
(with .werft/ from main)

Copy link
Contributor

@iQQBot iQQBot left a comment

Choose a reason for hiding this comment

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

LGTM

@roboquat roboquat merged commit 7ca86cb into main Jun 16, 2022
@roboquat roboquat deleted the af/add-gcloud-auth branch June 16, 2022 10:37
@roboquat roboquat added deployed: IDE IDE change is running in production deployed: workspace Workspace team change is running in production labels Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed: workspace Workspace team change is running in production release-note-none size/S team: devx team: IDE team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants