Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Map XPKG annotations to OCI annotations

Open
#59 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli

Research direction

Start by reviewing issue #11 and the XPKG object-annotation and OCI pre-defined annotation specifications, then trace how crossplane project build currently handles OCI annotations. Define the opt-in mapping and verify that manually specified OCI annotations take precedence when both sources are present.

Written by the indexing model from the issue text.

Description

enhancement stale
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:

  • #11
  • crossplane/crossplane#7282

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

Dominant language
Go
Stars
19
Forks
31
Avg merge
2d 15h
Merged PRs (30d)
53

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from crossplane/cli

All issues in crossplane/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.