buildpacks-community / kpack-cli

A command line interface for interacting with kpack.
Other
33 stars 15 forks source link

Flag to import buildpack order from existing CNB builder images when creating Builders/ClusterBuilders #384

Open chenbh opened 10 months ago

chenbh commented 10 months ago

To ease with the transition between pack and kpack, we should make it easier to read/parse a CNB builder image into a kpack Builder resource.

Thanks to how kpack deals with buildpackages, we can easily import the buildpacks of a CNB builder and make it available to the Builders using kp buildpack create builder-jammy-base --image paketobuildpacks/builder-jammy-base. However, to create a Builder/ClusterBuilder, we still need to extract the ordering from the CNB builder image. We can do this by using pack builder inspect and parsing the output, but it would be nicer if kp is smart enough to do it for us.

Maybe we can add a flag --order-from gcr.io/paketo-buildpacks/builder-jammy-base where kp can grab the image config and extract the io.buildpacks.buildpack.order label to be used in the spec.