-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
⚠️ make UseExistingCluster a pointer to support explicitly op… #463
⚠️ make UseExistingCluster a pointer to support explicitly op… #463
Conversation
/assign @DirectXMan12 |
7005c81
to
a0caa74
Compare
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.
minor comments, otherwise lgtm
pkg/envtest/server.go
Outdated
func (te *Environment) useExistingCluster() bool { | ||
if te.UseExistingCluster == nil { | ||
useExistingCluster := strings.ToLower(os.Getenv(envUseExistingCluster)) == "true" | ||
te.UseExistingCluster = &useExistingCluster |
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.
no need to populate this here -- just return the env var without populating
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.
comment addressed, ptal
a0caa74
to
c9aad37
Compare
pkg/envtest/server.go
Outdated
if te.UseExistingCluster == nil { | ||
return strings.ToLower(os.Getenv(envUseExistingCluster)) == "true" | ||
} | ||
return *te.UseExistingCluster == true |
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: no need for == true
here, since it's a bool
c9aad37
to
0d3fbbc
Compare
comment addressed and CI happy @DirectXMan12 ptal |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adohe, DirectXMan12 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 |
use controller-runtime logging in controller
…t-out in the code
just as what #461 mentioned, make UseExistingCluster a pointer thus gives a way to explicitly opt-out in the code.