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

Cleanup & Refactor kClient generators code before migrating to devfile library #4131

Closed
maysunfaisal opened this issue Oct 22, 2020 · 2 comments · Fixed by #4134
Closed

Cleanup & Refactor kClient generators code before migrating to devfile library #4131

maysunfaisal opened this issue Oct 22, 2020 · 2 comments · Fixed by #4134
Assignees
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. area/refactoring Issues or PRs related to code refactoring
Milestone

Comments

@maysunfaisal
Copy link
Contributor

Repo devfile/parser is going to be the home for much of the generator's code that will be used odo, devworkspace operator and console.

The devfile/parser library should be able to generate basic Kubernetes objects from the devfile. The list of these functions and objects can be found documented at the design doc for the library and also the util funcs that can be found in the same doc.

Currently, Odo and Devworkspace operator repo generate their own Kube structs and objects, so there is a lot of redundant code and issue devfile/api#181 will be solving that problem for all the consumers of the devfile/parser.

@maysunfaisal maysunfaisal added kind/cleanup area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. labels Oct 22, 2020
@maysunfaisal
Copy link
Contributor Author

Discussed this with @kadel & @mik-dass and we figured this was the best approach for all the parties involved.

@maysunfaisal
Copy link
Contributor Author

maysunfaisal commented Oct 22, 2020

Some comments from @adisky on the doc https://docs.google.com/document/d/1ffLi37fM7LAjRK5SXAw-yVNwr9GchFYy_e_5VD-FOZc/edit#heading=h.v1ex47x85625

To summarize some of the early concerns:

  • kclient.GetContainers and GetVolumes should take devfile data obj as input and just return kube structs accordingly
  • GeneratePodTemplateSpec() should take all the information and generate the spec rather than passing the object around and adding resources to it later
  • kube and common utils have generator functions that should essentially reside in kclient generators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. area/refactoring Issues or PRs related to code refactoring
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants