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 optional GCP_IMG_REPO #427

Merged
merged 2 commits into from Oct 5, 2022
Merged

Conversation

Azahorscak
Copy link
Member

@Azahorscak Azahorscak commented Oct 4, 2022

Add optional env var to specify an individual GCR registry to use. If left blank the GCP default is used.

The gcp default contains the following registries.

gcr.io, asia.gcr.io, eu.gcr.io, us.gcr.io

This PR fixes #

Checklist

  • I have signed the CLA
  • I have updated/added any relevant documentation

Description

What's the goal of this PR?

What changes did you make?

What alternative solution should we consider, if any?

Add optional env var to specify an individual GCR registry to use. If left blank the GCP default is used. 
The gcp default contains the following registries. 
```
gcr.io, asia.gcr.io, eu.gcr.io, us.gcr.io
```
@CLAassistant
Copy link

CLAassistant commented Oct 4, 2022

CLA assistant check
All committers have signed the CLA.

@nungster
Copy link

nungster commented Oct 4, 2022

I ran this in a local container to verify that it works as intended. I set GCP_IMG_REPO=us.gcr.io and also edited my config.json to only pull from the us repo. Ran this test with the defaults and the Warning message shows up whether we specify one repo or all the repos.

Copy link

@nungster nungster left a comment

Choose a reason for hiding this comment

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

Also works with no if block and just running with the variable in line and not set in the environment.

Copy link
Member

@sudermanjr sudermanjr left a comment

Choose a reason for hiding this comment

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

LGTM. Like you said in the comments, I'm not sure the if statement is strictly necessary, but it's fine to have I think

@Azahorscak Azahorscak merged commit 165b54b into master Oct 5, 2022
@Azahorscak Azahorscak deleted the add-registry-override-prepare-gcloud branch October 5, 2022 18:01
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.

None yet

4 participants