mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
ipvs loadbalance
This commit is contained in:
parent
f8134deb63
commit
dce97b165e
@ -1145,10 +1145,13 @@ func (proxier *Proxier) syncProxyRules() {
|
|||||||
}
|
}
|
||||||
if !proxier.lbWhiteListCIDRSet.isEmpty() || !proxier.lbWhiteListIPSet.isEmpty() {
|
if !proxier.lbWhiteListCIDRSet.isEmpty() || !proxier.lbWhiteListIPSet.isEmpty() {
|
||||||
// link kube-services chain -> kube-fire-wall chain
|
// link kube-services chain -> kube-fire-wall chain
|
||||||
args := []string{"-m", "set", "--match-set", proxier.lbIngressSet.Name, "dst,dst", "-j", string(KubeFireWallChain)}
|
args := []string{
|
||||||
if _, err := proxier.iptables.EnsureRule(utiliptables.Append, utiliptables.TableNAT, kubeServicesChain, args...); err != nil {
|
"-A", string(kubeServicesChain),
|
||||||
glog.Errorf("Failed to ensure that ipset %s chain %s jumps to %s: %v", proxier.lbIngressSet.Name, kubeServicesChain, KubeFireWallChain, err)
|
"-m", "set", "--match-set", proxier.lbIngressSet.Name,
|
||||||
|
"dst,dst",
|
||||||
|
"-j", string(KubeFireWallChain),
|
||||||
}
|
}
|
||||||
|
writeLine(proxier.natRules, args...)
|
||||||
if !proxier.lbWhiteListCIDRSet.isEmpty() {
|
if !proxier.lbWhiteListCIDRSet.isEmpty() {
|
||||||
args = append(args[:0],
|
args = append(args[:0],
|
||||||
"-A", string(KubeFireWallChain),
|
"-A", string(KubeFireWallChain),
|
||||||
|
Loading…
Reference in New Issue
Block a user