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

Add pkg.dev to automagic config file population #1328

Merged
merged 1 commit into from
Jun 23, 2020

Conversation

jonjohnsonjr
Copy link
Contributor

Description

Kaniko currently does config file setup for GCR such that pushing to GCR
automagically works. This change does the same for pkg.dev:
https://cloud.google.com/artifact-registry

This also tightens up the hostname check to ensure we don't send
credentials to a registry that happens to contain "gcr.io".

This uses the --registries flag from docker-credential-gcr to configure only the registry we actually care about, instead of just blindly calling docker-credential-gcr configure-docker, which configures every domain. An alternative approach to this PR would be to add pkg.dev domains to the list of domains that docker-credential-gcr configure-docker configures by default (see GoogleCloudPlatform/docker-credential-gcr#68), but that has the unfortunate side effect of making docker build really slow (it fetches credentials for every configured registry), which we want to avoid.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

Kaniko currently does config file setup for GCR such that pushing to GCR
automagically works. This change does the same for pkg.dev:
https://cloud.google.com/artifact-registry

This also tightens up the hostname check to ensure we don't send
credentials to a registry that happens to contain "gcr.io".
@googlebot googlebot added the cla: yes CLA signed by all commit authors label Jun 23, 2020
@tejal29 tejal29 merged commit cdbd8af into GoogleContainerTools:master Jun 23, 2020
@jonjohnsonjr jonjohnsonjr deleted the artifact-registry branch July 20, 2020 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes CLA signed by all commit authors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants