-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Extract ParseCIDR and modify attachDetachControllerName #43736
Conversation
if err != nil { | ||
glog.Warningf("Unsuccessful parsing of cluster CIDR %v: %v", s.ClusterCIDR, err) | ||
} | ||
|
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.
Why are we moving this block outside the if ctx.IsControllerEnabled(nodeControllerName)
blocks? Seems like we only need to do that in the case where the nodeController
or routeController
are enabled.
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.
yes,but they are always set to be enabled and if so we do not need to parse that and print same warning message twice
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.
fair enough. worst case, if someone has these controllers disabled, they get an extra warning
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 think I have a preference not to do this, also. Each of these if blocks should logically be its own function, and moving this up here makes them less self contained. And given that this happens once on startup, and that CIDR parsing isn't particularly computationally intensive, this isn't really an efficiency win, either.
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.
Moved that back
/lgtm |
ping @lavalamp. Could I get the approve label ? |
/lgtm (for future reference, I think these little spell check PRs are more trouble than they're worth.) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: NickrenREN, lavalamp, sjenning
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 43870, 30302, 42722, 43736) |
Release note: