kubernetes / cloud-provider-vsphere

Kubernetes Cloud Provider for vSphere https://cloud-provider-vsphere.sigs.k8s.io
Apache License 2.0
244 stars 177 forks source link

Fix the stale Node issue in cache #1319

Closed DanielXiao closed 1 week ago

DanielXiao commented 2 weeks ago

The Node object in the nodeMap is never updated after added. After the Node gets its IP address , Node.status.addresses is still empty. The route controller report this error during creating the static route:

node xxxx has neither InternalIP nor ExternalIP

We should always get Node from the informer cache because it 's up-to-date

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

DanielXiao commented 1 week ago

E2E test passed https://github.com/team-cluster-api/cloud-provider-vsphere/pull/74

k8s-ci-robot commented 1 week ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DanielXiao, zhanggbj

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: - ~~[OWNERS](https://github.com/kubernetes/cloud-provider-vsphere/blob/master/OWNERS)~~ [DanielXiao,zhanggbj] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
zhanggbj commented 1 week ago

@DanielXiao Will it be cherry-picked to former releases?