feat: Migrate kp import to v1 API with ClusterLifecycle and ClusterBuildpack support#434
Merged
tomkennedy513 merged 2 commits intobuildpacks-community:mainfrom Jan 23, 2026
Conversation
…ildpack support This PR migrates the kp import command to use the new v1 API (kp.kpack.io/v1) with support for ClusterLifecycle and ClusterBuildpack CRDs. API Version Migration: - Update dependency descriptor to support kp.kpack.io/v1 API version - Add automatic conversion from v1alpha1 and v1alpha3 descriptors to v1 - Replace ConfigMap-based lifecycle management with ClusterLifecycle CRDs ClusterLifecycle Support: - Import creates ClusterLifecycle resources instead of updating the lifecycle ConfigMap - Support for multiple named lifecycles in a single descriptor - Add defaultClusterLifecycle field for aliasing (creates a 'default-lifecycle' alias) - Lifecycle images are pre-loaded (relocated) to the default repository ClusterBuildpack Support: - Add new clusterBuildpacks section to dependency descriptor - Support for standalone buildpack images (not part of a store) - Add defaultClusterBuildpack field for aliasing (creates a 'default' alias) - Buildpack images are pre-loaded (relocated) to the default repository - Buildpack image validation (checks for io.buildpacks.buildpackage.metadata label) ClusterBuilder Improvements: - Skip store reference in ClusterBuilder when clusterStore field is empty - Allows builders that only use ClusterBuildpacks without a ClusterStore Code Organization: - Move descriptor types and conversion logic to pkg/import/descriptor/ - Separate files for each API version (v1alpha1.go, v1alpha3.go, v1.go) - Add LastAppliedConfiguration annotation to ClusterLifecycle and ClusterBuildpack Backward Compatibility: - v1alpha1 and v1alpha3 descriptors are automatically converted to v1 format - Existing descriptors continue to work without modification - The lifecycle field in v1alpha3 is converted to a ClusterLifecycle named 'default-lifecycle'
99999c1 to
be60823
Compare
Contributor
|
lgtm. Adding as a note because we talked about it out of band, but I feel comfortable going to a v1 api for the descriptor because it now includes all the resources we have (which are quite stable and could arguably move to v1) and we don't plan to add anymore. |
tomkennedy513
approved these changes
Jan 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR migrates the
kp importcommand to use the new v1 API (kp.kpack.io/v1) with support forClusterLifecycleandClusterBuildpackCRDs.Changes
API Version Migration
kp.kpack.io/v1API versionv1alpha1andv1alpha3descriptors tov1ClusterLifecycleCRDsClusterLifecycle Support
ClusterLifecycleresources instead of updating the lifecycle ConfigMapdefaultClusterLifecyclefield for aliasing (creates a "default-lifecycle" alias)ClusterBuildpack Support
clusterBuildpackssection to dependency descriptordefaultClusterBuildpackfield for aliasing (creates a "default" alias)io.buildpacks.buildpackage.metadatalabel)ClusterBuilder Improvements
clusterStorefield is emptyCode Organization
pkg/import/descriptor/v1alpha1.go,v1alpha3.go,v1.go)LastAppliedConfigurationannotation to ClusterLifecycle and ClusterBuildpackExample v1 Descriptor
Backward Compatibility
v1alpha1andv1alpha3descriptors are automatically converted tov1formatlifecyclefield inv1alpha3is converted to aClusterLifecyclenamed "default-lifecycle"