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

Instantiate an operator backed service using yaml file #2723

Closed
2 tasks
dharmit opened this issue Mar 16, 2020 · 5 comments · Fixed by #2901
Closed
2 tasks

Instantiate an operator backed service using yaml file #2723

dharmit opened this issue Mar 16, 2020 · 5 comments · Fixed by #2901
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 v2 Issue or PR that applies to the v2 of odo
Projects

Comments

@dharmit
Copy link
Member

dharmit commented Mar 16, 2020

User Story

As a user I want to edit the example (alm-example) used to spin up an operator backed service. This is required because:

  • alm-examples used by odo to spin up an operator backed service are not always 100% functional in that, they contain template data which can't actually spin up a service.
  • I'd like to change certain parameters in the CR before spinning up an actual service

Acceptance Criteria

  • odo must add a flag (eg: --dry-run) which would show the example that will eventually be used to spin up the service. (Print yaml definition of CR when asked for dry-run #2810)

  • user should be able to provide a yaml file similar to aforementioned example that can then be used to spin up the service.

    This will be similar to oc create -f example.yaml

Links

/kind user-story

@openshift-ci-robot openshift-ci-robot added the kind/user-story An issue of user-story kind label Mar 16, 2020
@dharmit dharmit self-assigned this Mar 16, 2020
@dharmit dharmit added this to For consideration in Sprint 182 via automation Mar 30, 2020
@dharmit dharmit moved this from For consideration to In progress in Sprint 182 Apr 1, 2020
@dharmit dharmit moved this from In progress to To do in Sprint 182 Apr 1, 2020
@girishramnani girishramnani added the estimated-size/S (5-10) Rough sizing for Epics. Less then one sprint of work for one person label Apr 1, 2020
@kadel
Copy link
Member

kadel commented Apr 2, 2020

What will be the command?
Are you thinking about something like odo service create -f etcd.yaml ? Or some other approach?

@dharmit
Copy link
Member Author

dharmit commented Apr 3, 2020

#2810 addresses the first part of this issue's acceptance criteria.

@dharmit
Copy link
Member Author

dharmit commented Apr 3, 2020

@kadel I'm thinking of making user specify the operator name and crd name as is the case right now, and specify file name after that. Something like:

$ odo service create etcdoperator.v0.9.4 --crd EtcdCluster -f etcd.yaml

This long command will help us do some validation so that a user doesn't erroneously or purposefully try to create something else by doing odo service create -f etcd.yaml. They could create something else if we don't keep any validation because we're simply passing the unstructured data to the APIs.

What do you think about this approach?

@kadel
Copy link
Member

kadel commented Apr 3, 2020

Not sure about that. The commands above looks way too long and complicated :-( It is also full of duplicate values, everything that is specified is also in the yaml file :-(

We can still do some validation even without forcing users to provide duplicated parameters.

Would it be possible to simply parse the yaml file, get Kind and check if it matches one of the CRDs provided by already installed operators?

@dharmit
Copy link
Member Author

dharmit commented Apr 3, 2020

Yes. That sounds doable. Agree with your points about long and complicated. Let's go with it.

Just one clarification however. The odo service create command will accept a path to some yaml file only when experimental mode is enabled.

@dharmit dharmit moved this from To do to In progress in Sprint 182 Apr 9, 2020
@dharmit dharmit moved this from In progress to For review in Sprint 182 Apr 16, 2020
@girishramnani girishramnani removed this from For review in Sprint 182 Apr 20, 2020
@girishramnani girishramnani added this to For consideration in Sprint 183 via automation Apr 20, 2020
@girishramnani girishramnani moved this from For consideration to For review in Sprint 183 Apr 20, 2020
Sprint 183 automation moved this from For review to Done Apr 24, 2020
@rm3l rm3l added the v2 Issue or PR that applies to the v2 of odo label Jun 16, 2023
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 v2 Issue or PR that applies to the v2 of odo
Projects
Archived in project
Sprint 183
  
Done
Development

Successfully merging a pull request may close this issue.

5 participants