-
Notifications
You must be signed in to change notification settings - Fork 786
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 --ssh-public-key flag for create cluster aws command to use custo… #2610
Conversation
…mized pub key location
Hi @StephenWangasg. Thanks for your PR. I'm waiting for a jenkins-x member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
/lgtm |
/test this |
pkg/jx/cmd/create_cluster_aws.go
Outdated
@@ -44,6 +44,7 @@ type CreateClusterAWSFlags struct { | |||
NodeSize string | |||
MasterSize string | |||
State string | |||
SshPublicKey string |
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.
struct field SshPublicKey should be SSHPublicKey
@@ -488,14 +488,14 @@ func (options *ImportOptions) DraftCreate() error { | |||
return err | |||
} | |||
|
|||
provider, err := gits.CreateProvider(options.GitServer, options.GitUserAuth, options.Git()) |
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.
- options.GitProvider is already created before calling DraftCreate(). No need to create provider here.
- In case you run import via 'jx import --org orgname --github' and call the import in 2nd pass, options.GitUserAuth is nil, this ends up a crash here.
if options.Organisation == "" { | ||
gitUsername := options.GitUserAuth.Username | ||
options.Organisation, err = gits.GetOwner(options.BatchMode, provider, gitUsername, options.In, options.Out, options.Err) | ||
options.Organisation, err = gits.GetOwner(options.BatchMode, options.GitProvider, gitUsername, options.In, options.Out, options.Err) |
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.
Since options.GitProvider is for sure created before you call DraftCreate(), just use it here.
Any updates on this? |
sorry, we were having some infra issues, think that's all resolved now so fingers crossed this will go through now |
/test this |
pkg/jx/cmd/create_cluster_aws.go
Outdated
@@ -15,7 +15,7 @@ import ( | |||
"github.com/jenkins-x/jx/pkg/log" | |||
"github.com/jenkins-x/jx/pkg/util" | |||
"github.com/spf13/cobra" | |||
"gopkg.in/AlecAivazis/survey.v1" | |||
"gopkg.in/AlecAivazis/survey.v1" |
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.
wrong alignment
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.
Changed
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ccojocar, rawlingsj The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test this |
Add --ssh-public-key flag to "jx create cluster aws" command to use a pub key from a location rather the default ~/.ssh/id_rsa.pub