@@ -229,7 +229,6 @@ func (npc *NetworkPolicyController) processIngressRules(policy networkPolicyInfo
229
229
}
230
230
npc .ipSetHandlers [ipFamily ].RefreshSet (namedPortIPSetName , setEntries , utils .TypeHashIP )
231
231
232
- //nolint:goconst // don't need to make error messages a constant
233
232
comment := "rule to ACCEPT traffic from source pods to dest pods selected by policy name " +
234
233
policy .name + " namespace " + policy .namespace
235
234
if err := npc .appendRuleToPolicyChain (policyChainName , comment , srcPodIPSetName , namedPortIPSetName ,
@@ -256,7 +255,6 @@ func (npc *NetworkPolicyController) processIngressRules(policy networkPolicyInfo
256
255
// with specified port (if any) and protocol
257
256
if ingressRule .matchAllSource && ! ingressRule .matchAllPorts {
258
257
for _ , portProtocol := range ingressRule .ports {
259
- //nolint:goconst // don't need to make error messages a constant
260
258
comment := "rule to ACCEPT traffic from all sources to dest pods selected by policy name: " +
261
259
policy .name + " namespace " + policy .namespace
262
260
if err := npc .appendRuleToPolicyChain (policyChainName , comment , "" , targetDestPodIPSetName ,
@@ -302,7 +300,6 @@ func (npc *NetworkPolicyController) processIngressRules(policy networkPolicyInfo
302
300
303
301
if ! ingressRule .matchAllPorts {
304
302
for _ , portProtocol := range ingressRule .ports {
305
- //nolint:goconst // don't need to make error messages a constant
306
303
comment := "rule to ACCEPT traffic from specified ipBlocks to dest pods selected by policy name: " +
307
304
policy .name + " namespace " + policy .namespace
308
305
if err := npc .appendRuleToPolicyChain (policyChainName , comment , srcIPBlockIPSetName ,
@@ -413,7 +410,6 @@ func (npc *NetworkPolicyController) processEgressRules(policy networkPolicyInfo,
413
410
// with specified port (if any) and protocol
414
411
if egressRule .matchAllDestinations && ! egressRule .matchAllPorts {
415
412
for _ , portProtocol := range egressRule .ports {
416
- //nolint:goconst // don't need to make error messages a constant
417
413
comment := "rule to ACCEPT traffic from source pods to all destinations selected by policy name: " +
418
414
policy .name + " namespace " + policy .namespace
419
415
if err := npc .appendRuleToPolicyChain (policyChainName , comment , targetSourcePodIPSetName ,
0 commit comments