apple / pkl

A configuration as code language with rich validation and tooling.
https://pkl-lang.org
Apache License 2.0
10.35k stars 280 forks source link

[Feature] Support OCI registries for packages #354

Open eli-xciv opened 7 months ago

eli-xciv commented 7 months ago

It would be nice to be able to store packages in and use packages from an OCI registry.

This issue/request is to support the oci:// URI in addition to package:// for dependencies.

As for OCI artifacts and layer media types, pkl could adopt vendor based media types for each layer, if each generated artifact was added as a separate layer, such as application/vnd.apple.pkl.metadata.v1.xml for the metadata artifact application/vnd.apple.pkl.metadata.v1.checksum_sha256 for the metadata checksum application/vnd.apple.pkl.package.v1.zip for the actual package artifact and application/vnd.apple.pkl.package.v1.checksum_sha256 for the package checksum

This would possibly also require a change to the pkl-cli to add a flag to dictate how the package will be build (default | OCI)

bioball commented 7 months ago

We've thought about this! It's also how CUE and KCL decided to distribute their packages.

This is somewhat compelling; something that package: is missing right now is some sort of index. OCI registries solve that problem for us.

But, I think we need some more time to understand the trade-offs of our current package model before adding any changes here.

bvalyou commented 7 months ago

Since I'm looking at using Pkl as a replacement for Helm, being able to reuse our Helm registry for Pkl packages is something of a requirement. Currently considering using oras and some jank around local packages once they're downloaded to work around this for now.

eli-xciv commented 1 week ago

@bioball Just checking back in to see if you all have been able to have any conversations around packaging and possible support for this.

Thanks for any info!