-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix an issue where clusterClient's temporary kubeconfig files could persist after the application terminates. Add comments for the clusterclient New(...) methods. #390
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
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: spew 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 |
1c84ee3
to
538e226
Compare
/assign @roberthbailey @k4leung4 @mkjelland |
538e226
to
bc481a2
Compare
lgtm (please fix the nit though) |
Hi @roberthbailey I don't see any comment on what to change. |
|
||
func ifErrRemove(pErr *error, path string) { | ||
if *pErr != nil { | ||
err := os.Remove(path) |
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: should be cuddled:
if err := os.Remove(); err != nil { ... }
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.
…ersist after the application terminates. Add comments for the clusterclient New(...) methods.
bc481a2
to
856ca7e
Compare
/lgtm |
What this PR does / why we need it:
As pointed out by @roberthbailey on PR #384 there are opportunities for clusterclient to persist temporary files even after the application terminates. Namely in error scenarios while creating the clusterclient. This PR addresses those issues.
Special notes for your reviewer:
Release note:
@kubernetes/kube-deploy-reviewers