openyurtio / raven

provide layer 3 and layer 7 network connectivity among pods in different physical regions
Apache License 2.0
57 stars 37 forks source link

Optimized the centre gateway election policy #146

Open River-sh opened 1 year ago

River-sh commented 1 year ago

https://github.com/openyurtio/raven/blob/c680901d4064e593c49fab445f9a29d95a73af94/pkg/networkengine/vpndriver/driver.go#L78C1-L78C1

At present, the election mode of the centre gateway is selected sequentially from the nodes with underNAT=false. However, some edge nodes have public IP and underNAT=false, which is not suitable for centre. I hope to optimize the election policy of the centre gateway. I suggest select gateway with spec.exposedType=LoadBalancer or PublicIP as the centre.