kyma-project / cli

Simple set of commands to manage a Kyma installation
Apache License 2.0
111 stars 118 forks source link

POC: Kyma Modules command to list modules #2117

Open kwiatekus opened 1 month ago

kwiatekus commented 1 month ago

Description Prototype a new CLI command(s) that shows a module catalog, that is a list of all known modules. Implement classification of modules to distinguish offered modules from installed modules. From the installed ones, distinguish managed ones from non-managed ones. Implement filtering, ie:

Until we have a final module catalog we can use this one: https://raw.githubusercontent.com/kyma-project/community-modules/main/model.json

Detection of installed modules should be based on the workload labels ( kyma-project.io/module={module_name} https://github.com/kyma-project/community/issues/864) We should verify consistency across all modules first.

Reason A Kyma user needs a concise, comprehensive information about a catalog of modules installable in his kyma runtime, as well as those which are already installed (in which version) and weather the installed module is managed via control plane centrally or not.

kwiatekus commented 3 days ago

As agreed before kyma alpha modules should be projecting additional context regarding installed and managed modules on the all availabe module catalog.

When I run this command against a non managed kyma instance (hence no Kyma CR) this command doesnt show me any of the remaining info. It would be much better to skip this axtra context on non managed clusters and show what modules are installed projected on the list of all available ones.

Throwing error eliminates any usage on self-managed k8s clusters:

Error:
  failed to list modules

Error Details:
  failed to get managed Kyma modules: while getting managed modules: while getting Kyma CR: the server could not find the requested resource`

Please change that