-
Notifications
You must be signed in to change notification settings - Fork 41
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
Allow repeated ctp connects #434
Conversation
88cf933
to
ebe4453
Compare
cmd/up/controlplane/connect.go
Outdated
@@ -62,9 +62,18 @@ func (c *connectCmd) Run(ctx context.Context, p pterm.TextPrinter, upCtx *upboun | |||
} | |||
|
|||
// Check if the fs kubeconfig is already pointing to a control plane and return early if so. |
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.
Nit: I think this comment is now wrong.
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.
done
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.
One nit, one question about how this looks to a user (not sure about my question). Code looks okay, so I'll approve. If my question makes sense, I'll trust you to fix that bit without a second review. :)
cmd/up/controlplane/connect.go
Outdated
if err := clientcmd.ModifyConfig(clientcmd.NewDefaultClientConfigLoadingRules(), kubeConfig, false); err != nil { | ||
return err | ||
} | ||
p.Printfln("Switched back to context %q.", oldContext) |
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 wonder if this will be confusing for a user. If I'm reading this correctly, they'll see two messages in a row:
Switched back to context
Current context set to
That looks confusing to me. Do you agree?
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.
fixed. Not 100% sure which is better though.
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@upbound.com>
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@upbound.com>
ebe4453
to
397a8d2
Compare
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@upbound.com>
fee182d
to
4ef7aed
Compare
Do the full fix of #401.