odo
odo copied to clipboard
`odo add binding` should support shortnames and case-insensitive names of API resources
/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:
- [ ] Support short names of resources
- [ ] Support case-insensitive names of resources