nephio-project / nephio

Nephio is a Kubernetes-based automation platform for deploying and managing highly distributed, interconnected workloads such as 5G Network Functions, and the underlying infrastructure on which those workloads depend.
Apache License 2.0
93 stars 52 forks source link

Better selection mechanisms for packages during clone or at least get #697

Open liamfallon opened 3 months ago

liamfallon commented 3 months ago

Original issue URL: https://github.com/kptdev/kpt/issues/3402 Original issue user: https://github.com/johnbelamaric Original issue created at: 2022-07-21T19:59:57Z Original issue last updated at: 2022-07-25T11:21:52Z Original issue body: ### Describe your problem

Say I want to kpt alpha rpkg clone. Right now, I need the PackageRevision name. This is painful, it requires me to run kpt alpha rpkg get, and find the right entry in the list. This is painful.

It would be nice to be able to use the package name and revision, and/or the latest-revision label. If I can't use those directly in clone, perhaps at least supporting them in rpkg get would help. That is, it would be nice to be able to use field selectors or to have a label on the PackageRevision with the package name and be able to use label selectors (but #3401). That would allow something like:

kpt alpha rpkg clone $(kubectl get packagerevision -l package-name=coredns-caching,package-revision=v4) -n default ...

Original issue comments: