-
Notifications
You must be signed in to change notification settings - Fork 249
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
Registry metadata support in application manifest #2625
Comments
This ia a great discussion - thank you for writing all this up. A consideration here is what is part of the application definition and what is part of a particular environment (or a particular publish operation). For example, if you and I are collaborating on a project, I would be pushing my local builds to Of course, I can override the default registry name on the
|
Just thinking out loud. I understand it's early days for component packaging, but is there any standard annotation that exist today? For me, it sounds reasonable to have similar annotations, but I would assume they won't start with stuff like This is a bit more related to how you would publish remote components, but if it is something like One potential toml syntax could be to make a clear destination already for component and container based artifacts [registry.annotations]
"useful.annoation" = "for both component and oci"
[registry.oci]
name = "ghcr.io/vdice"
image = "myapp"
version = "latest"
[registry.oci.annotations]
"org.opencontainers.image.url" = "https://www.example.com"
[registry.warg.annotations]
" warg.image.url" = "https://www.example.com" |
For me, your point is mostly an issue in the open-source world (not to be neglected of course), but at least where I have worked we never had the developers pushing containers to their own repos, since it would share company IP outside the company domain. In general, I only have CI build my container images based on branches. So for me, I would always have the default value of CI in the |
The topic of registry metadata support in the Spin application manifest has come up a few times, most recently via #2612 where it was mentioned that declaration of annotations in the manifest itself could be useful, in addition to or as defaults for those that may be specified via the CLI at time of
spin registry push
.Initial brainstorm
The conversation in #2612 provoked a quick initial brainstorm that perhaps a top-level
[registry]
section could be a good way to go. In addition to a[registry.annotations]
section, the section could include other relevant metadata, such as:name
of registry, egghcr.io/vdice
image
(OCI image/artifact name, defaulting to application name but could be overridden here, egmyapp
)tag
(image tag, defaulting to application version, but could be overridden here, eglatest
).All together, the following would be an envisioned example:
(Note, annotation keys including
.
's would need to be quoted.)In this example, CLI support would be added such that
spin registry push
would just work, with no need to supply a<REFERENCE>
. (Though, if/when supplied, it would take precedence.) Instead, the defaults declared in the manifest would be used. In this case, the default reference published would beghcr.io/vdice/myapp:latest
.(TBD the CLI behavior when a full default reference cannot be derived from the manifest, for example if
registry
is missing butimage
andversion
are present, and when no<REFERENCE>
is supplied at time of command invocation.)Open questions
First, is this general approach something we'd like to pursue? If so, a SIP might be a preferred first action item from this issue.
What other metadata or sub-sections might we envision under
[registry]
?Web Assembly Component Registry interactions?
How would this design interact with a Web Assembly component registry? All of the above assumes the underlying registry is an OCI registry and the resulting image/artifact is an opinionated (read: customized OCI manifest layout and push/pull protocol) Spin app. (Conveniently, for the former, it currently looks like wasm component registries also use OCI registries under the hood.) What if Spin application authors would also (or instead) like to publish just the wasm component to a dedicated wasm component registry? Ref Push component to registry #2536 and a bit more tangentially, Remote component sources from the registry #1182.
My first hunch would be that all of the metadata supplied in
[registry]
would apply to the published wasm component(s) as well, unless somehow specified otherwise. Unless we think of any design-altering items now, perhaps we're okay to relegate the specifics to the implementor of Push component to registry #2536.The text was updated successfully, but these errors were encountered: