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
791 stars 244 forks source link

`odo add binding` should support shortnames and case-insensitive names of API resources #6113

Closed valaparthvi closed 1 year ago

valaparthvi commented 2 years ago

/kind feature

Which functionality do you think we should add?

odo add binding should support parsing short names and case insensitive names of API resources.

Why is this needed?

odo add binding currently detects a resource only with it's full name. It would be a nice to have feature to also support short names and case-insensitive names. For example, short name for PerconaServerMongoDB is psmdb. The command should support using short names as well, same goes for case-insensitive names.

Using full name:

$ k get PerconaServerMongoDB                         
NAME               ENDPOINT                                                                       STATUS   AGE
mongodb-instance   mongodb-instance-mongos.my-percona-server-mongodb-operator.svc.cluster.local   ready    4d21h

$  odo add binding --service mongodb-instance/PerconaServerMongoDB --name mongodb-go-app-binding
 ✓  Successfully added the binding to the devfile.
Run `odo dev` to create it on the cluster.

Using short name:

$ k get psmdb           
NAME               ENDPOINT                                                                       STATUS   AGE
mongodb-instance   mongodb-instance-mongos.my-percona-server-mongodb-operator.svc.cluster.local   ready    4d21h

$  odo add binding --service mongodb-instance/psmdb --name mongodb-go-app-binding                            
 ✗  "mongodb-instance/psmdb" service not found

Using case-insensitive name:

$ k get PerconaServermongodb
NAME               ENDPOINT                                                                       STATUS   AGE
mongodb-instance   mongodb-instance-mongos.my-percona-server-mongodb-operator.svc.cluster.local   ready    4d21h

$ odo add binding --service mongodb-instance/PerconaServermongodb --name mongodb-go-app-binding
 ✗  "mongodb-instance/PerconaServermongodb" service not found

Acceptance Criteria:

github-actions[bot] commented 1 year 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.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 30 days since being marked as stale.