Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Optionally mirror dependent Docker Hub images #981

Merged
merged 1 commit into from
Nov 6, 2020

Conversation

sethvargo
Copy link
Member

Also allow customizing the image used in CI via an environment variable.

Fixes #959

Release Note

Add Terraform module to optionally mirror dependent Docker Hub images for tests

/assign @chaodaiG

Also allow customizing the image used in CI via an environment variable.
@google-cla google-cla bot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Nov 5, 2020
@sethvargo
Copy link
Member Author

@chaodaiG to use this, we'll need to:

  1. Choose a project to host the mirror (could be any of them)
  2. Run the Terraform there and grant the Prow service account read permissions
  3. Set the CI_POSTGRES_IMAGE environment variable to point to the Artifact Registry image instead

Any thoughts on which project we should use? I already ran the Terraform against one for testing, so we could use that one. It doesn't have to be the same project as Prow.

@chaodaiG
Copy link
Contributor

chaodaiG commented Nov 5, 2020

@chaodaiG to use this, we'll need to:

  1. Choose a project to host the mirror (could be any of them)
  2. Run the Terraform there and grant the Prow service account read permissions
  3. Set the CI_POSTGRES_IMAGE environment variable to point to the Artifact Registry image instead

Any thoughts on which project we should use? I already ran the Terraform against one for testing, so we could use that one. It doesn't have to be the same project as Prow.

The GCP projects used for testing are not relevant in presubmit tests right now, the only cluster used for presubmit tests is the prow build cluster. So I would prefer let prow build cluster host these images.

  1. Run the Terraform there and grant the Prow service account read permissions

The prow service account used for test is the default compute engine service account for the project, I can grant it permission

@sethvargo
Copy link
Member Author

So I would prefer let prow build cluster host these images.

That would involve a decent amount of setup on the prow projects.

The prow service account used for test is the default compute engine service account for the project, I can grant it permission

See the PR in the -infra repo (I CCed you).

@chaodaiG
Copy link
Contributor

chaodaiG commented Nov 5, 2020

I see your point, and agreed. we can use one of the test project for this, let's use apollo-boskos-key-terraform-02

@sethvargo
Copy link
Member Author

@chaodaiG do we run the risk of that project being auto-deleted or cleaned up? I'd rather use one of our more static projects.

@chaodaiG
Copy link
Contributor

chaodaiG commented Nov 5, 2020

@sethvargo , actually you're right, there is a risk of cloud run service being cleaned up, but it's controlled by us. I wouldn't imagine the images being cleaned up though.

For static project, we don't have a different static project yet other than the prow build cluster, if desired we can set up another one, but it'll take some time for a reason.

@chaodaiG
Copy link
Contributor

chaodaiG commented Nov 6, 2020

/lgtm
/approve

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chaodaiG, sethvargo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot google-oss-robot merged commit d9e0f76 into main Nov 6, 2020
@google-oss-robot google-oss-robot deleted the sethvargo/mirror branch November 6, 2020 20:50
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Auto: added by CLA bot when all committers have signed a CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do something about new Docker Hub rate limits
3 participants