kube-proxy: rename field for congruence

This commit is contained in:
Tim Hockin 2019-01-03 10:26:51 -08:00
parent 2106447d21
commit 51442b1e8e

View File

@ -358,11 +358,11 @@ func NewProxier(ipt utiliptables.Interface,
} }
type iptablesJumpChain struct { type iptablesJumpChain struct {
table utiliptables.Table table utiliptables.Table
dstChain utiliptables.Chain dstChain utiliptables.Chain
sourceChain utiliptables.Chain srcChain utiliptables.Chain
comment string comment string
extraArgs []string extraArgs []string
} }
var iptablesJumpChains = []iptablesJumpChain{ var iptablesJumpChains = []iptablesJumpChain{
@ -390,7 +390,7 @@ func CleanupLeftovers(ipt utiliptables.Interface) (encounteredError bool) {
"-m", "comment", "--comment", jump.comment, "-m", "comment", "--comment", jump.comment,
"-j", string(jump.dstChain), "-j", string(jump.dstChain),
) )
if err := ipt.DeleteRule(jump.table, jump.sourceChain, args...); err != nil { if err := ipt.DeleteRule(jump.table, jump.srcChain, args...); err != nil {
if !utiliptables.IsNotFoundError(err) { if !utiliptables.IsNotFoundError(err) {
klog.Errorf("Error removing pure-iptables proxy rule: %v", err) klog.Errorf("Error removing pure-iptables proxy rule: %v", err)
encounteredError = true encounteredError = true
@ -679,8 +679,8 @@ func (proxier *Proxier) syncProxyRules() {
"-m", "comment", "--comment", jump.comment, "-m", "comment", "--comment", jump.comment,
"-j", string(jump.dstChain), "-j", string(jump.dstChain),
) )
if _, err := proxier.iptables.EnsureRule(utiliptables.Prepend, jump.table, jump.sourceChain, args...); err != nil { if _, err := proxier.iptables.EnsureRule(utiliptables.Prepend, jump.table, jump.srcChain, args...); err != nil {
klog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", jump.table, jump.sourceChain, jump.dstChain, err) klog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", jump.table, jump.srcChain, jump.dstChain, err)
return return
} }
} }