crossplane-contrib / crossplane-lint

27 stars 10 forks source link

only download the layer io.crossplane.xpkg: base #4

Open janwillies opened 1 year ago

janwillies commented 1 year ago

Currently, when including a provider package in .crossplane-lint.yaml all the OCI image layers are downloaded from the registry, including the go binary of the respective provider. However we are just interested in the CRDs so that we can validate the compositions against them.

Following the xpkg specification we should be able to look at the OCI manifest and download only the image with the annotation "io.crossplane.xpkg": "base". It contains a package.yaml with the yaml stream.

Here is a live example. Click on the digest to dive deeper: https://explore.ggcr.dev/?image=crossplanecontrib/provider-gitlab@sha256:3dd3d5b6f0fe600a2b43adbcf0e2ce289aff3838ffcab43e98ee37e9a231654b&mt=application%2Fvnd.docker.distribution.manifest.v2%2Bjson&size=1006