Make cloud-controller-manager pods tolerate all taints - #18510
Merged
kubernetes-prow[bot] merged 2 commits intoJun 29, 2026
Merged
Conversation
Contributor
|
Skipping CI for Draft Pull Request. |
rifelpet
marked this pull request as ready for review
June 26, 2026 01:52
Member
Author
|
/hold for feedback |
Member
Author
|
/hold cancel |
hakman
approved these changes
Jun 29, 2026
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Set
tolerations: [{operator: Exists}]on every cloud-controller-manager pod that runs withhostNetwork: true(AWS, Azure, DigitalOcean, GCP, Scaleway), so the CCM can always be scheduled onto a node regardless of which taints are currently present. The Scaleway CCM additionally gains anode-role.kubernetes.io/control-planenodeAffinity, since broadening its tolerations means tolerations can no longer keep it off worker nodes.The Azure
cloud-node-managerDaemonSet keepsnodeSelector: kubernetes.io/os: linux(it is a per-node agent and must run on every node); only its tolerations are broadened.This matches the pattern already used by node-level DaemonSets that must run everywhere — the Cilium agent, CNI plugins, and CSI node drivers all use
- operator: Exists.Why
e2e-kops-do-gossipis intermittently failing cluster validation, e.g.:https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/e2e-kops-do-gossip/2068280267818143744
The deadlock
With
--cloud-provider=external, a node has noInternalIPuntil the cloud-controller-manager initializes it. The Cilium agent needs that node IP — without it the agent dies withunable to determine direct routing device(k8sNodeIP=""), so it never becomes ready.Meanwhile the cilium-operator (
set-cilium-node-taints: "true") addsnode.cilium.io/agent-not-ready:NoScheduleto any node whose Cilium agent isn't ready yet. The DO CCM DaemonSet did not tolerate that taint. So once the operator taints the control-plane node before the CCM pod is bound there:InternalIPagent-not-readytaint → back to (1)A permanent deadlock. The CCM pod never appears at all and the cluster fails to validate.
Why it's a race, and why only some clouds lose it
The
agent-not-readytaint only blocks new scheduling — it never evicts an already-bound pod. So the outcome hinges entirely on whether the CCM pod is bound to the control-plane node before the cilium-operator taints it.This is decided during control-plane bootstrap by which static-pod component wins a restart-timing race:
extension-apiserver-authenticationconfigmap (identical behavior on every cloud).Pendingwith no scheduler; when the scheduler finally comes up it binds the all-tolerating Cilium pod to the control-plane node first, the operator taints the node, and the CCM pod is locked out.Observed on the failing DO run vs. a passing AWS run:
Because the margin is environmental (control-plane bring-up speed, not config), the same DO job passes on runs where the control plane comes up quickly — which is exactly why it's flaky rather than always-failing. The placement constraints, node-IP handling, Cilium routing mode (
tunnel/ipam: kubernetes), and addon apply order are all identical between the passing and failing clouds, so none of those explain the difference — it is purely the bootstrap restart-timing race.Every external CCM in kops shares this latent exposure; they just run on clouds whose control planes usually win the race. Making the CCM tolerate all taints removes the dependency on winning that window entirely.
Testing
hack/update-expected.sh); manifestHashes update so existing clusters re-apply the new manifests automatically.go test ./cmd/kops/and the bootstrapchannelbuilder tests pass.🤖 Generated with Claude Code