mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-10-01 21:11:06 +02:00
fix lint errors
This commit is contained in:
parent
2c4dd7d584
commit
c8f7daf7ce
@ -387,7 +387,7 @@ func (npc *NetworkPolicyController) ensureTopLevelChains() {
|
|||||||
// for the traffic to/from the local pod's let network policy controller be
|
// for the traffic to/from the local pod's let network policy controller be
|
||||||
// authoritative entity to ACCEPT the traffic if it complies to network policies
|
// authoritative entity to ACCEPT the traffic if it complies to network policies
|
||||||
for _, chain := range chains {
|
for _, chain := range chains {
|
||||||
comment := "rule to explictly ACCEPT traffic that comply to network policies"
|
comment := "rule to explicitly ACCEPT traffic that comply to network policies"
|
||||||
args := []string{"-m", "comment", "--comment", comment, "-m", "mark", "--mark", "0x20000/0x20000", "-j", "ACCEPT"}
|
args := []string{"-m", "comment", "--comment", comment, "-m", "mark", "--mark", "0x20000/0x20000", "-j", "ACCEPT"}
|
||||||
err = iptablesCmdHandler.AppendUnique("filter", chain, args...)
|
err = iptablesCmdHandler.AppendUnique("filter", chain, args...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -126,7 +126,7 @@ func (npc *NetworkPolicyController) syncPodFirewallChains(networkPoliciesInfo []
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set mark to indicate traffic from/to the pod passed network policies.
|
// set mark to indicate traffic from/to the pod passed network policies.
|
||||||
// Mark will be checked to explictly ACCEPT the traffic
|
// Mark will be checked to explicitly ACCEPT the traffic
|
||||||
comment := "\"set mark to ACCEPT traffic that comply to network policies\""
|
comment := "\"set mark to ACCEPT traffic that comply to network policies\""
|
||||||
args := []string{"-A", podFwChainName, "-m", "comment", "--comment", comment, "-j", "MARK", "--set-mark", "0x20000/0x20000", "\n"}
|
args := []string{"-A", podFwChainName, "-m", "comment", "--comment", comment, "-j", "MARK", "--set-mark", "0x20000/0x20000", "\n"}
|
||||||
npc.filterTableRules.WriteString(strings.Join(args, " "))
|
npc.filterTableRules.WriteString(strings.Join(args, " "))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user