feat: make ADC the default option for GCP authentication when using go-containerregistry #9456
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related with:
gcloud
CLI #9457Description
This is to remove the dependency with
gcloud
CLI when interacting with a private Google Registry using the go-containerregistry libray. Changing the implementation of Skaffold's Keychain to first check if it can get the access token through Application Default Credentials, if not possible then it will fallback to usegcloud
CLI.I tried to use the google.Keychain authenticator, but it will first check if the registry is a known Google registry, if not it will fail. This will be breaking a case where users have a custom domain pointing to a Google Registry and configured in their
.docker/config.json
:Looks like that case is possible according to https://cloud.google.com/blog/topics/developers-practitioners/hack-your-own-custom-domains-container-registry
Also extending logic to detect known Google Registries (so they don't need to be configured in
.docker/config.json
)Follow-up Work (remove if N/A)
We're still missing more places to remove the
gcloud
dependency. More coming.