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

Enable label support #1207

Closed
Kevin-Molina opened this issue Jul 16, 2024 · 2 comments
Closed

Enable label support #1207

Kevin-Molina opened this issue Jul 16, 2024 · 2 comments

Comments

@Kevin-Molina
Copy link
Contributor

Kevin-Molina commented Jul 16, 2024

Right now, when running docker inspect on an apko generated image, the Config.Labels. field is set to null.
It would be nice to add support similar to what exists for annotations (config file/ --annotations support), but for labels instead.

Context

On annotations vs labels, here's my understanding (please chime in if I'm missing anything):

There's (3) major OCI config/manifest files.

  1. OCI Image index - Points to os/arch specific manifest files for an image
  2. Image manifest - os/arch specific, layers etc
  3. OCI Image Configuration file - This is what you see when you e.g. docker inspect and has the Config.Labels field

Notably (1) and (2) support annotations (3) supports labels (again - What you can view with docker inspect).
You can view annotations on (1) and (2) via docker buildx imagetools inspect ..., but annotations != labels. They kind of match in spec (?), but my understanding is the distinction is where they show up.

APKO supports annotations with (1) and (2).
It does not support (3).

Question

I see this PR open here that would merge annotations and labels - Anything provided as an annotations would become a label in the OCI image configuration file (shows up w/ docker inspect).

I wanted to ask so we can contribute either of them / merge the above PR / etc to see labels functionality -

Is the goal to:
A - Just allow users to provide annotations, and put them in all (3) locations?
B - Allow users to provide annotations that go into (1) and (2), but also provide labels that only go to (3)?
C - Something else?

Seeking clarification on how labels vs annotations ought to behave in apko and so it can be contributed.
Thank you!

@Kevin-Molina
Copy link
Contributor Author

Kevin-Molina commented Jul 22, 2024

Looking at this comment here:
#692 (comment)

@kaniini would you be able to chime in on preferred approach? We're eager to contribute it ASAP whichever direction you prefer. Alternatively, if there's a best person to raise this design question to, would appreciate it!!!

CC: @kaniini @amouat

@Kevin-Molina
Copy link
Contributor Author

Closed by #1215

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

No branches or pull requests

1 participant