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

Support image relocation #543

Closed
jeremyrickard opened this issue Aug 22, 2019 · 3 comments · Fixed by #719
Closed

Support image relocation #543

jeremyrickard opened this issue Aug 22, 2019 · 3 comments · Fixed by #719

Comments

@jeremyrickard
Copy link
Contributor

Images referenced by a CNAB bundle MAY be relocated , for example by copying them to a private registry. This process results in a mapping file:

{  "gabrtv/microservice@sha256:cca460afa270d4c527981ef9ca4989346c56cf9b20217dcea37df1ece8120687": "my.registry/microservice@sha256:cca460afa270d4c527981ef9ca4989346c56cf9b20217dcea37df1ece8120687",
  "technosophos/helloworld:0.1.0": "my.registry/helloworld:0.1.0"
}

That mapping file should be mounted into an invocation image at: `

The spec further says:

The run tool MAY use this file to modify its behavior. For example, a run tool MAY substitute image references using the mapping in this file.

We should enhance porter to enable a relocation file to be provided and mounted into an invocation image, then also modify the porter runtime so that anything in the relocation file can be used within the execution of a bundle operation. Ideally, if we implement #501, people that build bundles that reference images can simply refer to them like {{ bundle.images.SOMENAME}}, like in a call to the helm mixin or some other mixin that needs to use images, and then Porter will helpfully provide them with the correct reference.

@vdice vdice self-assigned this Sep 26, 2019
@vdice
Copy link
Member

vdice commented Oct 3, 2019

@carolynvs, @jeremyrickard and I discussed putting this back in the Backlog for now. As of writing, our main needs lie in bundle archiving and bundle publishing (from an archive) which may publish bundle images to a new registry but currently can do so with updated digests/shas. Therefore, as this ticket (and image relocation in general) brings in a more complex approach to republishing (most pertinently, preserving digests which will go in tandem with forthcoming security guarantees), we've decided to delay this work.

@vdice
Copy link
Member

vdice commented Oct 3, 2019

Also see related ticket discussed as part of this area of work: #687

@jeremyrickard
Copy link
Contributor Author

I believe with the new cnab-to-oci version, the relocation mapping is generated for us on a pull, so we can just inject it into the invocation image. #708 will handle wiring it up inside of the porter runtime manifest.

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 a pull request may close this issue.

2 participants