You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apply network policies to existing connections.
The dataplane now inspect the existing connections in the conntrack
table and evaluates against the current network policies.
If a established connection is no longer allowed then the dataplane
sets the conntrack entry timeout to zero, causing the subsequent packets
to be enqueued and processed dropping them if are no longer enabled.
The strict mode is enabled by default and runs at most every 30 seconds
once there is a change triggered in the dataplane, this is to avoid
performance issues for listing conntrack entries too often.
Copy file name to clipboardExpand all lines: pkg/cmd/cmd.go
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ type Options struct {
25
25
HostnameOverridestring
26
26
NetfilterBug1766Fixbool
27
27
DisableNRIbool
28
+
StrictModebool
28
29
}
29
30
30
31
// NewOptions creates a new Options object with default values.
@@ -41,6 +42,7 @@ func (o *Options) AddFlags(fs *flag.FlagSet) {
41
42
fs.StringVar(&o.HostnameOverride, "hostname-override", "", "If non-empty, will be used as the name of the Node that kube-network-policies is running on. If unset, the node name is assumed to be the same as the node's hostname.")
42
43
fs.BoolVar(&o.NetfilterBug1766Fix, "netfilter-bug-1766-fix", true, "If set, process DNS packets on the PREROUTING hooks to avoid the race condition on the conntrack subsystem, not needed for kernels 6.12+ (see https://bugzilla.netfilter.org/show_bug.cgi?id=1766)")
43
44
fs.BoolVar(&o.DisableNRI, "disable-nri", false, "If set, disable NRI, that is used to get the Pod IP information directly from the runtime to avoid the race explained in https://issues.k8s.io/85966")
45
+
fs.BoolVar(&o.StrictMode, "strict-mode", true, "If set, changes to network policies also affect established connections")
0 commit comments