-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Add edit flag so create instancegroup command is usable on scripts #3787
Conversation
/assign @justinsb |
cmd/kops/create_ig.go
Outdated
@@ -96,6 +98,7 @@ func NewCmdCreateInstanceGroup(f *util.Factory, out io.Writer) *cobra.Command { | |||
// DryRun mode that will print YAML or JSON | |||
cmd.Flags().BoolVar(&options.DryRun, "dry-run", options.DryRun, "If true, only print the object that would be sent, without sending it. This flag can be used to create a cluster YAML or JSON manifest.") | |||
cmd.Flags().StringVarP(&options.Output, "output", "o", options.Output, "Ouput format. One of json|yaml") | |||
cmd.Flags().BoolVar(&options.NoEditor, "no-editor", options.NoEditor, "If true, The instance group will be created by default with no option of editing it") |
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 know this is nit-picking - sorry - but how about --edit
with a default of true? I personally don't find negative flags not hard to think about ;-)
Otherwise I think this is great :-)
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 did this in oder not to break how this was done before. If you want me to change it to be more understandable or to follow how the rest of the commands work, I'll do it.
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 think if we set the default to true (the third arg is the default) we can have edit
with a default of true (?)
/ok-to-test |
Oh - and you'll have to run |
@justinsb I've changed the flag to --edit as you sugested. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: justinsb The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. |
Until now, the opening of an interactive editor when creating a new instance group was mandatory.
This this commit, a new flag is added, so this is now optional.
This commit is backwards compatible.