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
Support overriding the --node-cidr-mask-size arg passed to kube-controller-manager #61705
Conversation
/assign @krousey |
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.
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 == "" { |
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'm wondering if setting default should go here https://github.com/jstangroome/kubernetes/blob/438818f22932c08b86ebaa7de5c7c5db9d6d7d7c/cmd/kubeadm/app/util/config/masterconfig.go#L38
since that's where we do this sort of thing
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.
@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)?
@fabriziopandini Good idea. I'll try moving lines 324 and 325 to the end of the function and see how that falls out. |
438818f
to
6fbf2da
Compare
@fabriziopandini PR updated to use your suggested approach. |
/ok-to-test |
/lgtm |
@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:
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. |
@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? |
/test pull-kubernetes-e2e-gce |
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.
/approve
[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 |
/test all [submit-queue is verifying that this PR is safe to merge] |
/retest |
@jstangroome: The following test failed, say
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. |
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. |
Fixes: kubernetes/kubeadm#724
Release note: