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

Extract ParseCIDR and modify attachDetachControllerName #43736

Merged
merged 1 commit into from
Apr 10, 2017

Conversation

NickrenREN
Copy link
Contributor

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 28, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels Mar 28, 2017
if err != nil {
glog.Warningf("Unsuccessful parsing of cluster CIDR %v: %v", s.ClusterCIDR, err)
}

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved that back

@sjenning
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 28, 2017
@NickrenREN
Copy link
Contributor Author

ping @lavalamp. Could I get the approve label ?

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 8, 2017
@lavalamp lavalamp assigned lavalamp and unassigned sjenning Apr 10, 2017
@lavalamp
Copy link
Member

/lgtm
/approve

(for future reference, I think these little spell check PRs are more trouble than they're worth.)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 10, 2017
@k8s-github-robot
Copy link

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 10, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 43870, 30302, 42722, 43736)

@k8s-github-robot k8s-github-robot merged commit dda64fd into kubernetes:master Apr 10, 2017
@NickrenREN NickrenREN deleted the cm-extrac branch April 11, 2017 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants