odo icon indicating copy to clipboard operation
odo copied to clipboard

odo catalog

Open serenamarie125 opened this issue 3 years ago • 3 comments

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

  • --catagory show only operators in a given category (see an example for where category comes from)
  • --filter show only operators that have the given phrase in the information that odo is showing (displayName, category, description, operator, resource)
  • --namespace display services in a given namespace (and cluster-wide).

Command behavior and error states

  • If the command is executed in a directory with odo component (.odo/env.yaml exists and has namespace set). It should use namespace as defined there.
  • If the command is executed in a directory that is not odo component it should use the default namespace as set in KUBECONFIG unless --namespace is used.
  • It always displays operators that are installed cluster-wide.

serenamarie125 avatar Mar 07 '22 03:03 serenamarie125

@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?

tmds avatar Jan 11 '23 05:01 tmds

@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.

kadel avatar Jan 11 '23 16:01 kadel

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

github-actions[bot] avatar Oct 30 '23 09:10 github-actions[bot]