Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Add pkg.dev to automagic config file population#1328

Merged
tejal29 merged 1 commit intoGoogleContainerTools:masterfrom
jonjohnsonjr:artifact-registry
Jun 23, 2020
Merged

Add pkg.dev to automagic config file population#1328
tejal29 merged 1 commit intoGoogleContainerTools:masterfrom
jonjohnsonjr:artifact-registry

Conversation

@jonjohnsonjr
Copy link
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes CLA signed by all commit authors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants