kubernetes-retired / cluster-api-provider-nested

Cluster API Provider for Nested Clusters
Apache License 2.0
301 stars 67 forks source link

✨ Adding VN Agent PodIP Provider #269

Closed christopherhein closed 2 years ago

christopherhein commented 2 years ago

What this PR does / why we need it:

This adds the ability to use the vn-agent as a DaemonSet but uses vn-agent pod IPs as the routable address to configure with the vnode UWS'ed object. Because this interface is used for all syncing any updates to the node status object trigger a reconciliation. We handle vn-agent pod failures with status updates which triggers a resync.

⚠️ For anyone implementing this you should have a node level check for example node-exporter or an initContainer on the vn-agent which updates a condition on the Node or other part of the node object. By doing this the syncer will update all your VirtualClusters VNodes anytime the vn-agent is rescheduled, this can be done without rebinding.

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

No issue filed.

Signed-off-by: Chris Hein me@chrishein.com

christopherhein commented 2 years ago

/cc @Fei-Guo

christopherhein commented 2 years ago

Blocked on #270

Fei-Guo commented 2 years ago

One last nit, please change the copyright year for all touching files.

christopherhein commented 2 years ago

@Fei-Guo ✅ done, just waiting for tests to pass again.

Fei-Guo commented 2 years ago

/lgtm /approve

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christopherhein, Fei-Guo

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: - ~~[virtualcluster/OWNERS](https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/main/virtualcluster/OWNERS)~~ [Fei-Guo,christopherhein] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment