-
Notifications
You must be signed in to change notification settings - Fork 104
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
Operator Skeleton Generators #1222
Conversation
needs testing but otherwise good to go! |
I watched the video for now https://drive.google.com/open?id=1R5flVq_rHBv3KipwqWOVDsISegmsLTsB I need to think about the feel of creating tree structure like plans/phases/tasks from CLI because it felt a bit hard to follow... I like that it tells you what are the options but other than that I find working directly with YAML a bit better. |
First of all, nice video! 👏 I wish we would make more videos like this and post them on our blog. However, you could see that a purely CLI tool for generating nested plan/phase/step/task structures has limited usefulness - if I wouldn't know the underlying structure I would be lost there. Questions:
|
when we get this landed... I plan to have a more polished video and will push it to our youtube chan. Regarding questions I'm not sure what custom validators for fields you are referring to :( scheme discussion welcomed but seems separate from this PR. |
package add maintainer working Signed-off-by: Ken Sipe <kensipe@gmail.com> notes Signed-off-by: Ken Sipe <kensipe@gmail.com> renaming of vars Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
…in step already Signed-off-by: Ken Sipe <kensipe@gmail.com>
… part of stdout Signed-off-by: Ken Sipe <kensipe@gmail.com>
…confirm no duplicates for params Signed-off-by: Ken Sipe <kensipe@gmail.com>
878c632
to
4b5be7e
Compare
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
if err != nil { | ||
return "", err | ||
} | ||
if exists { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stylistic, mind adding whitespace between each } and next statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approval with some stylistic nits, overall looks good. does promptui include a default selection when confirming? i.e. (Y/n) or (y/N). I didn't see it in godoc and haven't tested.
oh, @kensipe, can you also add a flag to auto-confirm (or skip confirmation) so this can be used in CI/CD or other automated environments? Then someone could use it with atomist, or wrap it, etc. |
Signed-off-by: Ken Sipe <kensipe@gmail.com>
@kensipe please open a tracking issue and link this PR as well as a checkbox for docs |
} | ||
|
||
// ForMaintainer prompts to gather information to add an operator maintainer | ||
func ForMaintainer() (*v1beta1.Maintainer, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't mind having this file split into more than one, but that's just a nit.
Co-Authored-By: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Co-Authored-By: Andreas Neumann <aneumann@mesosphere.com> Signed-off-by: Ken Sipe <kensipe@gmail.com> Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
What this PR does / why we need it:
This PR provides skeleton generation for operator developers with the following capabilities.
Previously implemented but likely modified.
kudo package new foo
-> creates a new operator from a relative location to the command. The default is to create an "operator" folder with operator and params files for an operator named foo.kudo package new -i foo
-> goes into interactive mode to create an operator, allowing for user input to the creation of the operator metadata.This PR provides:
kudo package add maintainer
which adds maintainers to the operatorkudo package add task
which adds tasks and creates resources. It also guides the creation of pipe tasks.kudo package add plan
which adds plans, phases, steps and tasks to the operator.kudo package add parameter
which adds params to the params.yaml file.Fixes #1087
Fixes #1081
Fixes #1083
Fixes #1084