-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use swagger.json to get available parameters for odo service create
#4850
Comments
/triage needs-information As a part of research, please also break this "Epic" down into "User Stories". |
We need to consider how this will help $ odo catalog list services
Services available through Operators
NAME CRDs
etcdoperator.v0.9.4-clusterwide EtcdCluster, EtcdBackup, EtcdRestore
redis-operator.v0.6.0 RedisCluster, Redis
$ odo catalog describe service redis-operator.v0.6.0/RedisCluster
Kind: RedisCluster
Version: v1beta1
Description: Redis Cluster
Parameters:
PATH DISPLAYNAME DESCRIPTION
$ odo catalog describe service redis-operator.v0.6.0/Redis
Kind: Redis
Version: v1beta1
Description: Redis
Parameters:
PATH DISPLAYNAME DESCRIPTION |
Currently, there are three places where we know we can get the parameters' info from:
Based on the discussion between @kadel and Adapters team, ODC is mainly using swagger.json and relies on X descriptors only for additional data it provides on top of what's available via swagger.json. In odo, so far, we have relied on X descriptors as primary source of info, and only now we're trying to use what swagger.json has to offer. odo should try and change its approach to how ODC is doing it, because swagger seems to have much more information than X Descriptors. |
Three cases (arranged by ascending priority): Case 1: User has access to the CRD's api path, cluster provides an api to get metadata for any CRD needed. URL - Case 2: Get the swagger.json from the openapi endpoint provided by kubernetes, Case 3: Admin-only approach of using CRD api from the cluster: https://github.com/openshift/odo/blob/main/docs/proposals/improved-schema-for-services.md#fetch-clusterserviceversion-to-generate-the-information Parsing the dataCase 1:
Case 2: Fetch the same openAPIV3Schema from the cluster's swagger.json from the endpoint /api/kubernetes/openapi/v2 and parse it as mentioned in https://github.com/openshift/odo/blob/main/docs/proposals/improved-schema-for-services.md#user-has-access-to-openapiv3schema Case 3: Use the Commandsodo catalog describe serviceHuman readable output:
odo service createParse the user inputs provided via |
Scope:
|
Scope
|
Acceptance criteria:
odo catalog describe service
andodo catalog describe service -o json
needs to be the same regardless of where the information about parameters is coming fromCSV
orswagger.json
odo catalog describe service -o json
should be in some standard format like OpenAPIV3, JSONSchema etc...CSV
andswagger.json
. No need to cache the wholeswagger.json
we can just store information about parameters (more at Revised Proposal to param based operator service creation #4751 (comment))odo service create -p ...
The text was updated successfully, but these errors were encountered: