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

KUBE-556: get GCP token source at startup #14

Merged
merged 8 commits into from
Sep 25, 2024

Conversation

Trojan295
Copy link
Contributor

@Trojan295 Trojan295 commented Sep 18, 2024

I checked that under the hood the GCP SDK creates a oauth2.TokenSource (https://pkg.go.dev/golang.org/x/oauth2/google#DefaultTokenSource). It already handles token expiration and caching.

I decided use the oauth2.TokenSource directly, as the wrappers we created don't add value in this case.

Also ensure that Send is done from a single goroutine.

@Trojan295 Trojan295 marked this pull request as ready for review September 19, 2024 07:22
@Trojan295 Trojan295 requested review from ValyaB and Tsonov September 19, 2024 07:22
@Trojan295 Trojan295 force-pushed the KUBE-556/get-credentials-at-startup branch from 99bba99 to 0ea1e47 Compare September 23, 2024 07:35
@Trojan295 Trojan295 requested a review from stgleb September 24, 2024 12:47
Copy link

@stgleb stgleb left a comment

Choose a reason for hiding this comment

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

LGTM

@Trojan295 Trojan295 merged commit 84a1cde into main Sep 25, 2024
2 checks passed
@Trojan295 Trojan295 deleted the KUBE-556/get-credentials-at-startup branch September 25, 2024 14:00
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