Skip to content
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

describe operator backed services #2615

Closed
4 tasks done
kadel opened this issue Feb 17, 2020 · 13 comments · Fixed by #4671
Closed
4 tasks done

describe operator backed services #2615

kadel opened this issue Feb 17, 2020 · 13 comments · Fixed by #4671
Assignees
Labels
estimated-size/S (5-10) Rough sizing for Epics. Less then one sprint of work for one person kind/user-story An issue of user-story kind priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). v2 Issue or PR that applies to the v2 of odo

Comments

@kadel
Copy link
Member

kadel commented Feb 17, 2020

User Story

As a user, I want to get detailed information about operator backed service before I create it

Acceptance Criteria

  • odo catalog describe service <name> should provide detailed information about the service from OperatorHub.
  • odo catalog describe service <name> -o json should provide detailed information about the service from OperatorHub in json format

Same AC moved from #2785

  • odo catalog describe service <service-mame> - should include all available parameters, that can be used in odo service create command.
  • odo catalog describe service <service-mame> -o json - should include all available parameters, that can be used in odo service create command in json format, so it can be programmatically parsed and proper odo service create command can be generated

Links

/kind user-story
/area catalog
/area service-operators

@kadel
Copy link
Member Author

kadel commented Feb 19, 2020

I would suggest addressing #2613 (Instantiate service through Operator) first.
When #2613 is implemented it will create nice MVP, that can already be used by odo users (list what can be installed odo catalog list services and install it using odo service create)

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 4, 2020
@dharmit dharmit removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 5, 2020
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 28, 2020
@girishramnani
Copy link
Contributor

girishramnani commented Mar 24, 2021

Current scoped work

We were able to figure out how a non-admin user was able to still see the CRD form in web console. Its based on spec.customresourcedefinitions present in the ClusterServiceVersion.
Now this CRD def is different then whats provided by the CustomResourceDefinition ( it has less information ) but as we dont have access to CustomResourceDefinition kind as a normal user we cannot use it, so instead we use ClusterServiceVersion's crd def.

This is how one of the customresourcedefinition looks like ( Kafka from strimzi )

{
  "parameters": [
    {
      "description": "Kafka version",
      "displayName": "Version",
      "path": "kafka.version",
      "x-descriptors": [
        "urn:alm:descriptor:com.tectonic.ui:text"
      ]
    },
    {
      "description": "The desired number of Kafka brokers.",
      "displayName": "Kafka Brokers",
      "path": "kafka.replicas",
      "x-descriptors": [
        "urn:alm:descriptor:com.tectonic.ui:podCount"
      ]
    },
    {
      "description": "The type of storage used by Kafka brokers",
      "displayName": "Kafka storage",
      "path": "kafka.storage.type",
      "x-descriptors": [
        "urn:alm:descriptor:com.tectonic.ui:select:ephemeral",
        "urn:alm:descriptor:com.tectonic.ui:select:persistent-claim",
        "urn:alm:descriptor:com.tectonic.ui:select:jbod"
      ]
    },
    {
      "description": "Limits describes the minimum/maximum amount of compute resources required/allowed",
      "displayName": "Kafka Resource Requirements",
      "path": "kafka.resources",
      "x-descriptors": [
        "urn:alm:descriptor:com.tectonic.ui:resourceRequirements"
      ]
    },
    {
      "description": "The desired number of Zookeeper nodes.",
      "displayName": "Zookeeper Nodes",
      "path": "zookeeper.replicas",
      "x-descriptors": [
        "urn:alm:descriptor:com.tectonic.ui:podCount"
      ]
    },
    {
      "description": "The type of storage used by Zookeeper nodes",
      "displayName": "Zookeeper storage",
      "path": "zookeeper.storage.type",
      "x-descriptors": [
        "urn:alm:descriptor:com.tectonic.ui:select:ephemeral",
        "urn:alm:descriptor:com.tectonic.ui:select:persistent-claim",
        "urn:alm:descriptor:com.tectonic.ui:select:jbod"
      ]
    },
    {
      "description": "Limits describes the minimum/maximum amount of compute resources required/allowed",
      "displayName": "Zookeeper Resource Requirements",
      "path": "zookeeper.resources",
      "x-descriptors": [
        "urn:alm:descriptor:com.tectonic.ui:resourceRequirements"
      ]
    }
  ]
}

As first step we would show this value as is when someone asks for json output for Kafka from strimzi.

  • odo catalog service describe strimzi-cluster-operator.v0.21.1/Kafka would show the above json

Similarly the output for human readable output would be -

FieldPath                     Display Name                                        Description
zookeeper.resources Zookeeper Resource Requirements     Limits describes the minimum/maximum amount of compute resources required/allowed
....

Or Maybe consider a non tablular approach instead?

- FieldPath: zookeeper.resources
   DisplayName: Zookeeper Resource Requirements
   Description: Limits describes the minimum/maximum amount of compute resources required/allowed
- FieldPath: zookeeper.storage.type
   DisplayName: ....
   ...

Also maybe we can sort the fields using the fieldpath? so it would look like


kafka.version
kafka.replicas
zookeeper.storage.type

So deeper fields are shown lower?

@girishramnani
Copy link
Contributor

girishramnani commented Mar 24, 2021

@dgolovin can you Please validate the json output part

@girishramnani
Copy link
Contributor

Also do we wanna do autocomplete? we would need to do some caching for a usable autocomplete as the api call would be slow.

@kadel
Copy link
Member Author

kadel commented Mar 24, 2021

Or Maybe consider a non tablular approach instead?

I would go with tabular.
But considering the length of description lets go with non-tabular.

Also maybe we can sort the fields using the fieldpath? so it would look like

I would keep the original ordering. It looks like it follows some logical ordering.

Also do we wanna do autocomplete? we would need to do some caching for a usable autocomplete as the api call would be slow.

We can check autocomplete later. Not a high priority now.

@dharmit dharmit added estimated-size/S (5-10) Rough sizing for Epics. Less then one sprint of work for one person and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels Mar 25, 2021
@girishramnani girishramnani removed their assignment Apr 15, 2021
@girishramnani girishramnani self-assigned this Apr 15, 2021
@dharmit dharmit removed the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Apr 22, 2021
@girishramnani
Copy link
Contributor

girishramnani commented Apr 29, 2021

I had a question how to distinguish if the user is asking for service catalog service or an operator.
Should I assume if its of the format <operator>/<CR> i.e. strimzi-cluster-operator.v0.21.1/Kafka then its operator CR?
@kadel

@girishramnani
Copy link
Contributor

Also if a user provide just odo catalog describe service <operator-name> then should I show all CRs under it?
If so then we need to find a better way to distinguish if a user is asking for operators backed services or service catalog services

@kadel
Copy link
Member Author

kadel commented Apr 29, 2021

I had a question how to distinguish if the user is asking for service catalog service or an operator.
Should I assume if its of the format <operator>/<CR> i.e. strimzi-cluster-operator.v0.21.1/Kafka then its operator CR?
@kadel

yes

Also if a user provide just odo catalog describe service <operator-name> then should I show all CRs under it?
If so then we need to find a better way to distinguish if a user is asking for operators backed services or service catalog services

if it is operator based service it should always be specified as operator/cr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimated-size/S (5-10) Rough sizing for Epics. Less then one sprint of work for one person kind/user-story An issue of user-story kind priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). v2 Issue or PR that applies to the v2 of odo
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants