Skip to content

allow setting annotations#1426

Merged
imjasonh merged 1 commit intoko-build:mainfrom
seankhliao:annotations
Oct 16, 2024
Merged

allow setting annotations#1426
imjasonh merged 1 commit intoko-build:mainfrom
seankhliao:annotations

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
@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