You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add controller-driven kube-vip load balancer for K3S_BASE clusters
This PR implements controller-driven Kubernetes LoadBalancer services
for CLUSTER_TYPE_K3S_BASE in eve-k.
- pkg/pillar/types/clustertypes.go: Add LBInterfaceConfig (interface +
CIDR string) and LBInterfaces []LBInterfaceConfig to both
EdgeNodeClusterConfig and EdgeNodeClusterStatus.
- pkg/pillar/cmd/zedagent/parseconfig.go: Parse LoadBalancerService
from the controller proto and populate
EdgeNodeClusterConfig.LBInterfaces (K3S_BASE only; first
interface/CIDR entry applied).
- pkg/pillar/cmd/zedkube/clusterstatus.go: Relay LBInterfaces from
EdgeNodeClusterConfig into EdgeNodeClusterStatus on the bootstrap
node only; non-bootstrap nodes publish an empty list so they do not
trigger kube-vip setup.
- pkg/pillar/dpcmanager/dns.go: Filter kube-vip VIPs out of
DeviceNetworkStatus.AddrInfoList using the LBInterfaces CIDR range,
preventing VIPs from being used as source addresses for
controller-bound traffic.
- pkg/kube/cluster-init.sh: Add check_kubevip_lb loop that reads
EdgeNodeClusterStatus JSON each iteration and calls kubevip-apply.sh
or kubevip-delete.sh when the LB config changes. Persists
last-applied state to avoid redundant re-applies across restarts.
- pkg/kube/kubevip-apply.sh / kubevip-delete.sh: Scripts to
install/remove the kube-vip DaemonSet and kube-vip-cloud-provider
Deployment, configuring the IP pool via a kubevip ConfigMap.
- pkg/kube/kubevip-ds.yaml: kube-vip DaemonSet manifest (ARP mode,
control-plane nodes).
- pkg/kube/config.yaml: Disable k3s built-in ServiceLB (servicelb) and
Traefik for K3S_BASE — kube-vip replaces ServiceLB; users bring
their own ingress.
- pkg/pillar/docs/zedkube.md: Document the feature with an overview
diagram, data-flow, EVE-API proto, and DeviceNetworkStatus filtering
notes.
Signed-off-by: naiming-zededa <naiming@zededa.com>
0 commit comments