redhat-developer / odo

odo - Developer-focused CLI for fast & iterative container-based application development on Podman and Kubernetes. Implementation of the open Devfile standard.
https://odo.dev
Apache License 2.0
777 stars 243 forks source link

odo catalog #5523

Open serenamarie125 opened 2 years ago

serenamarie125 commented 2 years ago

description to be updated by @kadel

Goal

Users should be able to use odo catalog command to list all operator-backed services. They should be able to filter by name or by category/label

Example

$ odo catalog                                                                                                                       
TODO: Intro text (Include  goal as well as the steps that they are going to take ( including terminology ))  

DisplayName: PerconaServerMongoDB
Category: Database
Description: Instance of a Percona Server for MongoDB replica set
Operator: Percona Distribution for MongoDB Operator
Resource: perconaservermongodbs.psmdb.percona.com/v1-11-0

DisplayName: PerconaServerMongoDBBackup
Category: Database
Description: Instance of a Percona Server for MongoDB Backup
Operator: Percona Distribution for MongoDB Operator
Resource: perconaservermongodbbackups.psmdb.percona.com/v1

DisplayName: PerconaServerMongoDBRestore
Category: Database
Description: Instance of a Percona Server for MongoDB Restore
Operator: Percona Distribution for MongoDB Operator
Resource: perconaservermongodbrestores.psmdb.percona.com/v1

DisplayName: Postgres Cluster
Category: Database
Description: PostgresCluster is the Schema for the postgresclusters API
Operator: Crunchy Postgres for Kubernetes
Resource: postgresclusters.postgres-operator.crunchydata.com/v1beta1

DisplayName: RedisEnterpriseDatabase
Category: Database
Description: Deploy a Redis Enterprise Database on an Operator managed  Redis Enteprise Cluster
Operator: Redis Enterprise Operator
Resource: redisenterprisedatabases.app.redislabs.com/v1alpha1

DisplayName: RedisEnterpriseCluster
Category: Database
Description: Deploy a Redis Enterprise Cluster
Operator: Redis Enterprise Operator
Resource: redisenterpriseclusters.app.redislabs.com/v1              

to show only databases

odo catalog --category database                                                                                                                      

to show filter items that mention "maria" in name , description, operator or resource filed

odo catalog --search maria
note: the above example output was generated using following kubectl command ``` $ cat template {{- range .items -}} {{ $item := . }} {{ range $item.spec.customresourcedefinitions.owned }} DisplayName: {{.displayName}} Category: {{$item.metadata.annotations.categories}} Description: {{.description}} Operator: {{$item.spec.displayName}} Resource: {{.name}}/{{.version}} {{ end }} {{- end -}} $ kubectl get csv -o go-template-file=template ```

Flags

Command behavior and error states

tmds commented 1 year ago

@kadel the catalog command was removed in https://github.com/redhat-developer/odo/pull/5577, is the intent to add it back at some point?

kadel commented 1 year ago

@kadel the catalog command was removed in #5577, is the intent to add it back at some point?

Currently not. We removed all logic around creating operator-backed services from odo. TBH, the experience was not what we wanted it to be :-( I don't think that with the current state of the Operator ecosystem, we can make user-friendly CLI interface for installing operator-backed services. At some point, we will probably revisit this, but it is not in our short term list.

github-actions[bot] commented 9 months ago

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.