cnabio / cnab-spec

Cloud Native Application Bundle Specification
https://cnab.io
Other
950 stars 100 forks source link

Discussion: Defining annotations in the registry specification #382

Open radu-matei opened 3 years ago

radu-matei commented 3 years ago

@carolynvs's original comment:

Should the spec define how to populate or use the annotations?

chris-crone commented 3 years ago

We expect CNABs to be stored in several different formats: (1) OCI with correct media type, (2) OCI with image media types, and (3) Docker manifest list with image media types. Given that, I think that guidance on annotations would be useful as it allows registry owners and tool builders to give users more information more easily.

That being said, Docker manifest lists don't have annotations in the spec. So if we'd like to be prescriptive, we will need to do so only on the bundle's manifest.

WDYT?

SteveLasker commented 3 years ago

Please don't ask registry operators to special-case CNABs, just as we don't ask file-systems to special-case certain extensions. Consolidating on a single mediaType that defines a CNAB, will make CNABs more consumable. If registries have to guess, or add logic for what mediaType is used in certain situations, it will only complicate its usage. Annotations are great for search information, but not good for declaring a thing. Here are some thoughts that might help: OCI Artifact Authoring: Annotations & Config.json