mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Always create kubeClusterIPSet
This commit is contained in:
parent
4905c339cc
commit
e1cf2eec09
@ -789,14 +789,11 @@ func (proxier *Proxier) syncProxyRules() {
|
|||||||
}
|
}
|
||||||
// add service Cluster IP:Port to kubeServiceAccess ip set for the purpose of solving hairpin.
|
// add service Cluster IP:Port to kubeServiceAccess ip set for the purpose of solving hairpin.
|
||||||
// proxier.kubeServiceAccessSet.activeEntries.Insert(entry.String())
|
// proxier.kubeServiceAccessSet.activeEntries.Insert(entry.String())
|
||||||
// Install masquerade rules if 'masqueradeAll' or 'clusterCIDR' is specified.
|
|
||||||
if proxier.masqueradeAll || len(proxier.clusterCIDR) > 0 {
|
|
||||||
if valid := proxier.ipsetList[kubeClusterIPSet].validateEntry(entry); !valid {
|
if valid := proxier.ipsetList[kubeClusterIPSet].validateEntry(entry); !valid {
|
||||||
glog.Errorf("%s", fmt.Sprintf(EntryInvalidErr, entry, proxier.ipsetList[kubeClusterIPSet].Name))
|
glog.Errorf("%s", fmt.Sprintf(EntryInvalidErr, entry, proxier.ipsetList[kubeClusterIPSet].Name))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
proxier.ipsetList[kubeClusterIPSet].activeEntries.Insert(entry.String())
|
proxier.ipsetList[kubeClusterIPSet].activeEntries.Insert(entry.String())
|
||||||
}
|
|
||||||
// ipvs call
|
// ipvs call
|
||||||
serv := &utilipvs.VirtualServer{
|
serv := &utilipvs.VirtualServer{
|
||||||
Address: svcInfo.ClusterIP,
|
Address: svcInfo.ClusterIP,
|
||||||
|
Loading…
Reference in New Issue
Block a user