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

Support OCI labels #538

Closed
shibumi opened this issue Dec 14, 2021 · 2 comments
Closed

Support OCI labels #538

shibumi opened this issue Dec 14, 2021 · 2 comments

Comments

@shibumi
Copy link

shibumi commented Dec 14, 2021

Hi,

I think it would be a cool addition to ko if it's possible to specify additional labels via command line flags or via the ko configuration file.
The OCI image-spec defines the following standard labels: https://github.com/opencontainers/image-spec/blob/main/annotations.md

@shibumi
Copy link
Author

shibumi commented Dec 14, 2021

Closing this. I just realized there is an --image-label flag.

@shibumi shibumi closed this as completed Dec 14, 2021
@imjasonh
Copy link
Member

FWIW there's probably more we could do to detect and set these by default. Buildpacks is looking into a similar thing (buildpacks/rfcs#196), and some of the stuff coming in Go 1.18 should make it easier to extract from the build environment. See #366

Like with base image annotations (#221) we'd only be able to set the annotations on indexes if they're OCI indexes, which doesn't apply to the default distroless base image 😭. We should still be able to annotate images though, and we've toyed with the idea of always pushing OCI images (w/ annotations) even if the base was a non-OCI image (see #449), but this fails when pushing to some registries (e.g., quay.io), so it was reverted.

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

2 participants