carvel-dev / kapp-controller

Continuous delivery and package management for Kubernetes.
https://carvel.dev/kapp-controller
Apache License 2.0
268 stars 105 forks source link

kapp-controller should handle the case when same package+version is present in multiple Package Repositories #147

Closed vibhas closed 2 years ago

vibhas commented 3 years ago

Describe the problem/challenge you have Packages can come either directly from a user or sourced from one or more package repositories. This gives rise to the problem of colliding packages. More specifically, if there are two distinct sources, each providing a package with the same name as the other, but with a different spec, there is no reliable way for kapp-controller to determine which package is the preferred one.

Describe the solution you'd like We will need to write a proposal on how this situation can be handled on kapp-controller.

danielhelfand commented 3 years ago

I think it is a completely valid use case that a PackageRepository may have the same exact Package that a PackageRepository already created on the cluster has. In this case, it would be great to allow the creation of the PackageRepository with the overlapping Package to be created successfully. It would be interesting also handling deletion in this case as the deletion of the PackageRepository couldn't delete the overlapping Package since it is used by another PackageRepository.

The other case that is a little more complicated is if the Package has the same name and version but is a different Package than the same named/versioned Package that already exists on the cluster.

cppforlife commented 2 years ago

dup of https://github.com/vmware-tanzu/carvel-kapp-controller/issues/428