Skip to content
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

cluster: write a frozen kubeconfig when we connect #5786

Merged
merged 2 commits into from
May 6, 2022
Merged

Conversation

nicks
Copy link
Member

@nicks nicks commented May 6, 2022

Hello @milas, @lizzthabet,

Please review the following commits I made in branch nicks/minify2:

01f0473 (2022-05-06 15:20:37 -0400)
cluster: write a frozen kubeconfig when we connect

Code review reminders, by giving a LGTM you attest that:

  • Commits are adequately tested
  • Code is easy to understand and conforms to style guides
  • Incomplete code is marked with TODOs
  • Code is suitably instrumented with logging and metrics

@nicks nicks requested review from lizzthabet and milas May 6, 2022 19:24
@nicks
Copy link
Member Author

nicks commented May 6, 2022

a lot of this PR is just getting the right API objects to the right places

Copy link
Contributor

@milas milas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woooo

}

printer := printers.YAMLPrinter{}
path, err := r.base.ConfigFile(filepath.Join("cluster", nn.Name))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: RuntimeFile seems more appropriate for this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return &config, nil
err = clientcmd.ConfirmUsable(config, config.CurrentContext)
if err != nil {
return APIConfigOrError{Error: errors.Wrap(err, "Overriding Kubernetes context")}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: this is always happening now, so a more generic message like "Loading Kubernetes config" might be more applicable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@nicks nicks merged commit ab3e996 into master May 6, 2022
@nicks nicks deleted the nicks/minify2 branch May 6, 2022 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants