-
Notifications
You must be signed in to change notification settings - Fork 456
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 registry prefix option #477
Conversation
pkg/framework/util.go
Outdated
@@ -297,6 +297,7 @@ func ListImage(c internalapi.ImageManagerService, filter *runtimeapi.ImageFilter | |||
|
|||
// PullPublicImage pulls the public image named imageName. | |||
func PullPublicImage(c internalapi.ImageManagerService, imageName string, podConfig *runtimeapi.PodSandboxConfig) string { | |||
imageName = TestContext.RegistryPrefix + imageName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the imageName may already contains the image registry, e.g. "gcr.io/cri-tools/test-image-1:latest"
. So adding another prefix may not work. I think we should parse the image first and replace the registry with TestContext.RegistryPrefix
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I changed the implementation to parse the image name before. Since the parsing expects a fully qualified image name, we now fallback to the intial imageName
if the parsing fails. If not, we split up the domain and replace it.
49cdc2e
to
f49dfeb
Compare
Please take a look again, I had to change the benchmark images to be fully qualified to make the registry prefix replacement work. |
f49dfeb
to
fcdaf75
Compare
Tests failed:
|
c43c4aa
to
caeccfb
Compare
I fixed the failing CI, in the end we would now need fully qualified images for every test. WDYT? |
Could we default to |
caeccfb
to
8e12e3a
Compare
Yeah I think so, I will make It's a bit tricky, sorry for all the different kind of approaches 😇 |
This allows to pre-pull the images and running benchmarks against a local registry. Signed-off-by: Sascha Grunert <[email protected]>
8e12e3a
to
6af299e
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer, saschagrunert 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 |
This allows to pre-pull the images and running benchmarks against a
local registry.
Beside this, the succinct output for benchmarks seems more reasonable
to me, so we put it on per default.