Skip to content

Map XPKG annotations to OCI annotations #59

@eric-carlsson

Description

@eric-carlsson

What problem are you facing?

The XPKG spec has the concept of object annotations, which allow specifying package metadata. The OCI spec similarly has certain pre-defined annotation keys.

Right now there is no way to set OCI annotations on artifacts produced by crossplane project build. This is addressed by #11, but it requires that you specify both XPKG annotations and OCI annotations.

How could Crossplane help solve your problem?

Having to specify the same annotations twice for XPKG and OCI is annoying, especially if it's done in two different ways: one via configuration file (crossplane-project.yaml) and the other via CLI flag.

There is quite a big overlap between XPKG and OCI annotations. I think it could make sense to map from the former to the later, possibly as an opt-in (for example, --map-xpkg-to-oci-annotations). When this is set, it would automatically propagate meta.crossplane.io/source to org.opencontainers.image.source, etc. The details of this mapping needs to be figured out.

This could be done in addition to manually specifying OCI annotations (i.e. #11). If both are specified, I would expect them to be merged and for the manually specified OCI annotations to take precedence.

Related issues:

Awesome work on the CLI and DevEx tooling by the way!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions