Skip to content
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

PR4408 and networking changes for Clustering #4454

Merged

Conversation

milan-zededa
Copy link
Contributor

@milan-zededa milan-zededa commented Dec 2, 2024

This PR takes @naiming-zededa's commits from PR4408, fixes merge conflicts with the master and adds the last outstanding networking changes needed for the EVE node clustering (that depend on the content from PR4408).
For the description of the first 2 commits, see PR4408 (which is closed now since it is superseded with this PR).
The other two commits extends DPC Reconciler to configure cluster IP on the cluster interface and add some ACL rules to open ports needed for the nodes to communicate with each other.

naiming-zededa and others added 4 commits December 2, 2024 16:59
 - check kubernetes pod status and publish ENClusterAppStatus
   for multi-node cluster
 - subscribe the EdgeNodeClusterConfig and DeviceNetworkStatus for
   publishing the EdgeNodeClusterStatus for cluster-init.sh to use
 - implement cluster server status HTTP service for others to join
   the cluster
 - collect stats from kubernetes cluster for node/pod/vmi and
   publish clusterInfo
 - implement cluster leader election for cluster reporter
 - documented the functionalities of zedkube in pillar/doc/zedkube.md

Signed-off-by: Naiming Shen <[email protected]>
 - Add vendor files for Implement Cluster for zedkube related functions

Signed-off-by: Naiming Shen <[email protected]>
NIM subscribes to EdgeNodeClusterStatus published by zedkube
and passes this to DPCManager and further into DPCReconciler.
Cluster IP address is assigned to the cluster interface statically
(directly using netlink, not via dhcpcd).

zedkube subscribes to DeviceNetworkStatus to determine if the cluster
IP address is assigned and ready to use. Once assigned, it will update
EdgeNodeClusterStatus with ClusterIPIsReady set to true, which the
script cluster-init.sh is waiting for before it starts the procedure
of node joining the cluster.

Signed-off-by: Milan Lenco <[email protected]>
Ensure that packets destined for K3s services do not use the default route,
but are instead routed through the cluster port. This guarantees that traffic
handled by kube-proxy is properly SNATed to the cluster IP. That's the theory
at least. We're not entirely certain. Without this route, however,
some Longhorn pods fail to access K3s services when the cluster IP is configured
on a non-default port.

Signed-off-by: Milan Lenco <[email protected]>
@milan-zededa milan-zededa changed the title PR4408 and networking changes for Clustered EVE PR4408 and networking changes for Clustering Dec 2, 2024
Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eriknordmark eriknordmark merged commit a85bf88 into lf-edge:master Dec 3, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants