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

Support overriding the --node-cidr-mask-size arg passed to kube-controller-manager #61705

Merged
merged 2 commits into from Apr 4, 2018

Conversation

@jstangroome
Contributor

jstangroome commented Mar 26, 2018

Fixes: kubernetes/kubeadm#724

Release note:

kubeadm config can now override the Node CIDR Mask Size passed to kube-controller-manager.
@jstangroome

This comment has been minimized.

Contributor

jstangroome commented Mar 26, 2018

/assign @krousey

@jamiehannaford

can't we already do this with ControllerManagerExtraArgs?

@@ -336,7 +336,10 @@ func getControllerManagerCommand(cfg *kubeadmapi.MasterConfiguration, k8sVersion
// Let the controller-manager allocate Node CIDRs for the Pod network.
// Each node will get a subspace of the address CIDR provided with --pod-network-cidr.
if cfg.Networking.PodSubnet != "" {
maskSize := calcNodeCidrSize(cfg.Networking.PodSubnet)
maskSize := cfg.Networking.NodeCIDRMaskSize
if maskSize == "" {

This comment has been minimized.

@jamiehannaford
@fabriziopandini

@jstangroome thanks for your PR!

I fully agree that we extraArgs should override default arguments.

However I think that the solution you are proposing fixes this problem only for the mask size.

What do you think about a slightly different solution that before builds all the default arguments and only at the end of the function builds the command merging extraArgs (in other words, what about moving https://github.com/jstangroome/kubernetes/blob/438818f22932c08b86ebaa7de5c7c5db9d6d7d7c/cmd/kubeadm/app/phases/controlplane/manifests.go#L324 and L235 at the end of the function)?

@jstangroome

This comment has been minimized.

Contributor

jstangroome commented Mar 26, 2018

@fabriziopandini Good idea. I'll try moving lines 324 and 325 to the end of the function and see how that falls out.

@jstangroome

This comment has been minimized.

Contributor

jstangroome commented Mar 30, 2018

@fabriziopandini PR updated to use your suggested approach.

@fabriziopandini

This comment has been minimized.

Contributor

fabriziopandini commented Mar 30, 2018

/ok-to-test

@fabriziopandini

This comment has been minimized.

Contributor

fabriziopandini commented Mar 30, 2018

/lgtm
/CC @timothysc for approval
@jstangroome thanks! It would be great if you send twin PR for fixing the same problem on other components installed by kubeadm :😉

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Mar 30, 2018

@fabriziopandini: GitHub didn't allow me to request PR reviews from the following users: for, approval.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/lgtm
/CC @timothysc for approval
@jstangroome thanks! It would be great if you send twin PR for fixing the same problem on other components installed by kubeadm :😉

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jstangroome

This comment has been minimized.

Contributor

jstangroome commented Apr 3, 2018

@fabriziopandini I'll look into what would be involved to fix the extra args handling for the other components installed by kubeadm.

Also, I'm not sure I understand how the GitHub Test failures correlate to my code changes. Any suggestions on how to investigate this?

@fabriziopandini

This comment has been minimized.

Contributor

fabriziopandini commented Apr 4, 2018

/test pull-kubernetes-e2e-gce

@timothysc

/approve

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Apr 4, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, jstangroome, timothysc

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

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Apr 4, 2018

/test all [submit-queue is verifying that this PR is safe to merge]

@fabriziopandini

This comment has been minimized.

Contributor

fabriziopandini commented Apr 4, 2018

/retest

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Apr 4, 2018

@jstangroome: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce 6fbf2da link /test pull-kubernetes-e2e-gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Apr 4, 2018

Automatic merge from submit-queue (batch tested with PRs 61705, 61609, 62103, 62113, 62115). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-merge-robot k8s-merge-robot merged commit fca2bd2 into kubernetes:master Apr 4, 2018

12 of 16 checks passed

pull-kubernetes-e2e-gce Job failed.
Details
Submit Queue Required Github CI test is not green: pull-kubernetes-e2e-gce
Details
pull-kubernetes-e2e-kops-aws Job triggered.
Details
pull-kubernetes-kubemark-e2e-gce-big Job triggered.
Details
cla/linuxfoundation jstangroome authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details

@jstangroome jstangroome deleted the jstangroome:jstangroome-kubeadm-nodecidrmasksize branch Apr 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment