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

allow setting annotations #1426

Merged
merged 1 commit into from
Oct 16, 2024
Merged

allow setting annotations #1426

merged 1 commit into from
Oct 16, 2024

Conversation

seankhliao
Copy link
Contributor

This adds a new build flag for setting annotations on image indexes and manifests.
Annotations are no longer copied from the base image. org.opencontainers.image.base.digest and
org.opencontainers.image.base.name
are always set to the resolved values.

Usage example:

ko build --image-annotation foo=bar,fizz=buzz .

Fixes #1090
Fixes #1090
Fixes #1231
Fixes #1235
Fixes #1395

This adds a new build flag for setting annotations
on image indexes and manifests.
Annotations are no longer copied from the base image.
`org.opencontainers.image.base.digest` and
`org.opencontainers.image.base.name`
are always set to the resolved values.

Usage example:

```sh
ko build --image-annotation foo=bar,fizz=buzz .
```

Fixes ko-build#1090
Fixes ko-build#1090
Fixes ko-build#1231
Fixes ko-build#1235
Fixes ko-build#1395
@imjasonh
Copy link
Member

This looks good! I slightly wonder if we should have some mode (possibly default) where labels are just copied to annotations, but I don't feel strongly and this is clearly something that folks want, so let's just do it.

Thanks for this contribution!

@imjasonh imjasonh merged commit c98cb1e into ko-build:main Oct 16, 2024
20 of 21 checks passed
@seankhliao seankhliao deleted the annotations branch October 16, 2024 17:39
@afrittoli
Copy link

Cool, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants