Closed aneesh1 closed 3 days ago
Welcome @aneesh1!
It looks like this is your first PR to kubernetes-sigs/cloud-provider-azure 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-sigs/cloud-provider-azure has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
Hi @aneesh1. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
/approve /lgtm
@aneesh1: you cannot LGTM your own PR.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: aneesh1 Once this PR has been reviewed and has the lgtm label, please assign lzhecheng for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
This is where the cloud-node-manager starts running, please check. https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/pkg/nodemanager/nodemanager.go#L190
By the way, the cloud-node-manager runs as a daemonset separated from cloud-controller-manager since very long ago, not from v1.26.
What type of PR is this?
/kind bug
What this PR does / why we need it:
Overview
In
v1.26
, thecloud-node-controller
was running its reconciliation logic in thecloud-controller-manager
, but inv1.27
andv1.28
the it wasn't. When runningv1.26
of thecloud-controller-manager
in our cluster, we observed that thespec.ProviderID
field of nodes was populated, but not when runningv1.27
ORv1.28
. In addition, we observed NOUpdate
calls by thecloud-controller-manager
inv1.27
andv1.28
.We realized that in
v1.26
, thenode-controller
was configured to run by default onrelease-1.26
: https://github.com/kubernetes-sigs/cloud-provider-azure/blob/47d04bebceda815d88821badf318ba6bd061e9f5/vendor/k8s.io/cloud-provider/controllers/node/node_controller.go#L181but in
v1.27
: https://github.com/kubernetes-sigs/cloud-provider-azure/blob/95a67a1597c85b1565855320c3a8603ece2677ce/vendor/k8s.io/cloud-provider/controllers/node/node_controller.go#L184-L188and
v1.28
: https://github.com/kubernetes-sigs/cloud-provider-azure/blob/492d2fb0c241cd0877d9f70c4ef97462f274e252/vendor/k8s.io/cloud-provider/controllers/node/node_controller.go#L188-L192The
node-controller
would only run if theworkerCount
variable was configured.The
workerCount
variable gets configured in theNewCloudNodeController
function inrelease-1.27
:https://github.com/kubernetes-sigs/cloud-provider-azure/blob/95a67a1597c85b1565855320c3a8603ece2677ce/vendor/k8s.io/cloud-provider/controllers/node/node_controller.go#L113C6-L118
which is supposed to get configured via the command line argument
--concurrent-node-syncs
CLI flag: https://github.com/kubernetes-sigs/cloud-provider-azure/blob/be9e1821ee4fec885264eb256192a2bc419efbe4/cmd/cloud-controller-manager/app/core.go#L54In
release-1.27
andrelease-1.28
, this CLI flag is not provided: https://github.com/kubernetes-sigs/cloud-provider-azure/blob/release-1.27/cmd/cloud-controller-manager/app/options/options.go#L134-L155Justification
The
cloud-node-controller
configuration was removed fromv1.27
andv1.28
of thecloud-controller-manager
, thereby preventing the controller from being run. It seems likenode-controller
should be run as part of thecloud-node-manager
instead ofcloud-controller-manager
. Based on this issue, we understand that the reason behind this change is due to throttling by the cloud-provider, but inv1.26
and prior to thecloud-controller-manager
, we did not encounter issues with cloud provider limits onAzure
when thenode-controller
ran in thekube-controller-manager
. In addition, if a user does not want to run thenode-controller
as part of thecloud-controller-manager
they can simply exclude it from the list of controllers by doing-cloud-node-controller
and can deploy thecloud-node-manager
.Which issue(s) this PR fixes:
Fixes https://github.com/kubernetes-sigs/cloud-provider-azure/issues/1700
Special notes for your reviewer:
Does this PR introduce a user-facing change?