-
Notifications
You must be signed in to change notification settings - Fork 143
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
Allow host+subpath as the source registry for registry-override #2135
Comments
Hi team, I tried reproducing this issue. Was unsuccessful in doing so. change pwd to one of the examples cd examples/docs-games update the zarf.yaml images spec image to contain docker.io images:
- docker.io/defenseunicorns/zarf-game:multi-tile-dark pull, re-tag and push this image to personal docker registry at override registry zarf create package --registry-override docker.io/defenseunicorns=docker.io/waveywaves the above command runs successfully and so do the ones below
Would appreciate any direction understanding how to reproduce this issue
|
@waveywaves the way @lsoica ran it was a bit different, mostly showing how a replacement happened or didn't happen; with just a host the replacement will happen with whatever you put in the
Works as expected, but:
Does not work and will proceed as normal (in @lsoica 's case keeping The problem comes down to this part in the code: zarf/src/internal/packager/images/pull.go Line 87 in 7e91d3b
We only look for Instead of doing that if statement it should loop through the keys and values in |
…efenseunicorns#2135) Instead of looking for refInfo.Host in the override map loop through the keys and values in i.RegistryOverrides, check if the refInfo.Reference begins with an override key and, if it does, replace that override text with the override value and set it back to actualSrc. Do not use ImageTransformHostWithoutChecksum since we already have the parsed ref and all the info we need to do the replacement. default actualSrc to refInfo.Reference Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
…efenseunicorns#2135) Instead of looking for refInfo.Host in the override map loop through the keys and values in i.RegistryOverrides, check if the refInfo.Reference begins with an override key and, if it does, replace that override text with the override value and set it back to actualSrc. Do not use ImageTransformHostWithoutChecksum since we already have the parsed ref and all the info we need to do the replacement. default actualSrc to refInfo.Reference Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
…efenseunicorns#2135) Instead of looking for refInfo.Host in the override map loop through the keys and values in i.RegistryOverrides, check if the refInfo.Reference begins with an override key and, if it does, replace that override text with the override value and set it back to actualSrc. Do not use ImageTransformHostWithoutChecksum since we already have the parsed ref and all the info we need to do the replacement. default actualSrc to refInfo.Reference Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
…efenseunicorns#2135) Instead of looking for refInfo.Host in the override map loop through the keys and values in i.RegistryOverrides, check if the refInfo.Reference begins with an override key and, if it does, replace that override text with the override value and set it back to actualSrc. Do not use ImageTransformHostWithoutChecksum since we already have the parsed ref and all the info we need to do the replacement. default actualSrc to refInfo.Reference Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
…efenseunicorns#2135) Instead of looking for refInfo.Host in the override map loop through the keys and values in i.RegistryOverrides, check if the refInfo.Reference begins with an override key and, if it does, replace that override text with the override value and set it back to actualSrc. Do not use ImageTransformHostWithoutChecksum since we already have the parsed ref and all the info we need to do the replacement. default actualSrc to refInfo.Reference Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
…efenseunicorns#2135) Instead of looking for refInfo.Host in the override map loop through the keys and values in i.RegistryOverrides, check if the refInfo.Reference begins with an override key and, if it does, replace that override text with the override value and set it back to actualSrc. Do not use ImageTransformHostWithoutChecksum since we already have the parsed ref and all the info we need to do the replacement. default actualSrc to refInfo.Reference Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
…efenseunicorns#2135) Instead of looking for refInfo.Host in the override map loop through the keys and values in i.RegistryOverrides, check if the refInfo.Reference begins with an override key and, if it does, replace that override text with the override value and set it back to actualSrc. Do not use ImageTransformHostWithoutChecksum since we already have the parsed ref and all the info we need to do the replacement. default actualSrc to refInfo.Reference Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
…2306) ## Description Instead of looking for refInfo.Host in the override map loop through the keys and values in i.RegistryOverrides, check if the refInfo.Reference begins with an override key and, if it does, replace that override text with the override value and set it back to actualSrc. Do not use ImageTransformHostWithoutChecksum since we already have the parsed ref and all the info we need to do the replacement. ## Related Issue Fixes #2135 ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed --------- Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com> Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com> Co-authored-by: Austin Abro <37223396+AustinAbro321@users.noreply.github.com>
Currently, the --registry-override will respect the subpath when going from a host to a host+subpath but not the other way around.
(so --registry-override docker.io=mydomain.com/subpath works but --registry-override docker.io/subpath=mydomain.com doesn't)
The ask here is to extend the functionality with support for:
Additional context
Slack thread https://kubernetes.slack.com/archives/C03B6BJAUJ3/p1699559557724489?thread_ts=1687158762.361229&cid=C03B6BJAUJ3
The text was updated successfully, but these errors were encountered: