-
Notifications
You must be signed in to change notification settings - Fork 40
feat(cli): connect to cluster #813
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
base: master
Are you sure you want to change the base?
Conversation
done |
@chris-sun-star Could you please see this? |
if err != nil { | ||
if kubeerrors.IsNotFound(err) { | ||
return fmt.Errorf("OBCluster %s not found", o.Name) | ||
} else { |
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.
Please fix the lint problem showed in this page.
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.
There's only 2 problems, you don't need to handle the previously pushed code.
return fmt.Errorf("password is not specified and not found in secrets") | ||
} | ||
|
||
if o.TenantName != DEFAULT_TENANT_NAME && o.User != DEFAULT_USER { |
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.
Is here something missing
logger := utils.GetDefaultLoggerInstance() | ||
cmd := &cobra.Command{ | ||
Use: "connect <cluster_name>", | ||
Short: "Connect to an ob cluster by sys tenant", |
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.
It's not only sys tenant
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.
So actually, we just need one single command for tenant
module?
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 just mean the description, you've provided an option to pass the tenant name
|
Thanks again for your comment~ And I will fix the problem then. |
Summary
Now we can use okctl to connect to cluster by sys tenant, the function for connecting to other tenant is in progress.
Solution Description