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

author new artifact types for OCI operations #319

Closed
developer-guy opened this issue Aug 22, 2022 · 2 comments
Closed

author new artifact types for OCI operations #319

developer-guy opened this issue Aug 22, 2022 · 2 comments

Comments

@developer-guy
Copy link
Member

developer-guy commented Aug 22, 2022

We (w/@Dentrax) thought that one of the main goals of the OCI Artifacts1 is that it allows you to author new artifact types that you want to support within your client tooling.2 The first step of writing a new artifact type is to define a unique type for it.3 Defining a unique artifact allows various tools to know how to work with the type uniquely. When writing this, Flux's pull and push operations rely on the first layer of an image.4 As we can use client tools for registry and image operations such as crane, skopeo, etc., we have to know that we should put things to the first layer of an image, so, in today's world, we can store different things within the image layers in addition to the tarball. So, if we define Flux's artifact types for OCI, we can search them within image layers. With that, we don't need to limit ourselves to only storing things at the first layer of an image.

image

For example, OPA Rego policies can be stored on the OCI registry with their own types5; also, we have planned to do the same in Kyverno CLI6.

Footnotes

  1. https://github.com/opencontainers/artifacts

  2. https://github.com/opencontainers/artifacts/blob/main/artifact-authors.md

  3. https://github.com/opencontainers/artifacts/blob/main/artifact-authors.md#defining-a-unique-artifact-type

  4. https://github.com/fluxcd/pkg/blob/8d88cfe7078e71936258a70e111bd6a429fa2bc8/oci/client/pull.go#L65

  5. https://github.com/open-policy-agent/conftest/blob/master/internal/commands/push.go

  6. https://github.com/developer-guy/oci-kyverno/blob/master/main.go

@stefanprodan
Copy link
Member

@developer-guy
Copy link
Member Author

As Stefan mentioned, this was discussed in the given issues above, and I'm closing this one.

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