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

Chainguard annotations are, but should not be, propagated to multi-platform manifest #1231

Closed
MikeSpreitzer opened this issue Feb 6, 2024 · 4 comments · Fixed by #1426
Closed
Labels
lifecycle/stale question Further information is requested

Comments

@MikeSpreitzer
Copy link

When I ko build a multi-platform manifest, my manifest ends up with annotations attributing it to chainguard. Here is what I found:

{"org.opencontainers.image.authors": "Chainguard Team https://www.chainguard.dev/",
 "org.opencontainers.image.base.digest": "sha256:fce1fdce595332afe7f339303ae288c349c4e4139d926f8c7ccf4b7ca2911553",
 "org.opencontainers.image.base.name": "cgr.dev/chainguard/static:latest",
 "org.opencontainers.image.source": "https://github.com/chainguard-images/images/tree/main/images/static",
 "org.opencontainers.image.url": "https://edu.chainguard.dev/chainguard/chainguard-images/reference/static/"}
@cpanato
Copy link
Member

cpanato commented Feb 6, 2024

if you don't specify the base image that you want to use in your ko build it will use a default one which is cgr.dev/chainguard/static:latest you can check where we define that in https://github.com/ko-build/ko/blob/main/pkg/commands/options/build.go#L33

@cpanato cpanato added the question Further information is requested label Feb 6, 2024
@MikeSpreitzer
Copy link
Author

This is not a question. This is a bug. The problem is not the annotations that identify the base image. The problem is the other annotations.

Copy link

github-actions bot commented May 8, 2024

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
@peterhirn
Copy link

Reopen, eg. chainguard labels mixed in with my labels

"Labels": {
    "org.opencontainers.image.authors": "Chainguard Team https://www.chainguard.dev/",
    "org.opencontainers.image.created": "2024-09-09T05:27:49Z",
    "org.opencontainers.image.licenses": "MIT",
    "org.opencontainers.image.revision": "f97aa24922679eeabdf6d9e4b219c7cd889b4685",
    "org.opencontainers.image.source": "https://github.com/phi-ag/mta-sts-exporter",
    "org.opencontainers.image.url": "https://images.chainguard.dev/directory/image/static/overview",
    "org.opencontainers.image.vendor": "Chainguard",
    "org.opencontainers.image.version": "1.7.36"
}

Build
.ko.yaml

peterhirn added a commit to phi-ag/mta-sts-exporter that referenced this issue Sep 11, 2024
seankhliao added a commit to seankhliao/ko that referenced this issue Oct 15, 2024
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 pushed a commit that referenced this issue Oct 16, 2024
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 #1090
Fixes #1090
Fixes #1231
Fixes #1235
Fixes #1395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants