-
Notifications
You must be signed in to change notification settings - Fork 90
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
oci/client: pull any artifact #653
Conversation
feb567e
to
3818f0e
Compare
b70d673
to
9018b11
Compare
9018b11
to
7b5a7f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a test that proves "pull any artifact"? Maybe push something with crane in tests, no annotations from empty base and test pull.
e8e8ee9
to
ff2d0b6
Compare
@stefanprodan I added a simple test, PTAL :) |
ff2d0b6
to
6629b78
Compare
This is in order to allow `flux pull artifact` to retrieve any kind of OCI artifact, e.g. a Helm chart for debugging. Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
In OCI terms having platform `flux/flux/v2` implies that the image is runnable on some OS called "flux" on architecture called "flux". In reality there is no such platform and there is no good reason for Flux to pretend. OCI 1.1 (albeit still and RC at the moment), doesn't mandate artifact to define a platform at all. When client is constructed with a platform selector, many functions will apply the selector, which is often undesirable. The `flux/flux/v2` platform was only defined in client options, so it wasn't set on any images and is safe to drop; source-controller doesn't use `DefaultOptions`, so there is no concern. Another inconvenient behaviour of GGCR is that some functions will pick just the very first element that matches the platform and ignore any additional elements, e.g. elements with same platform, but different media type. That behaviour prevents searching for artefacts by media type. Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
6629b78
to
887bad4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @errordeveloper 🏅
Allow
flux pull artifact
to retrieve any kind of OCI artifact without an index, e.g. a Helm chart for debugging.