-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Is your enhancement request related to a problem? Please describe.
Users may want to ensure no unexpected connections will be denied by a new (B)ANP.
A dry-run mode should not affect any connections, and allow the networking plugin to provide feedback (e.g. via logging or observability tools) to see which connections will be dropped/allowed once this (B)ANP is enforced.
Describe the solution you'd like
A potential solution if to have a dry-run flag, that would make sure (B)ANP is not actually enforced.
It could allow network plugins to add logging/observability on top of this flag, but also make sure that the behaviour (not enforcing (B)ANP) is the same for all plugins.
While this flag is most useful in combination with plugin-specific logging/observability, network plugins don't have to provide anything on top of it.
The workflow should go something like this:
- design network policies for the cluster (exactly as you would do without any dry-run mode)
- apply them in dry-run mode to check if there are any unexpected effects of the designed network policies.
Similar features:
- calico: https://docs.tigera.io/calico-cloud/network-policy/staged-network-policies
- cilium Issue: Add support for policy "audit" mode vs "enforcing" mode cilium/cilium#9580
Describe alternatives you've considered
- Use Policy Assistant [Policy Assistant] calculate all allowed connections in a cluster #221, may have some limitations. Needs additional discussion.
- Leave it to be implementation-specific. More details on why it may be difficult to implement need to be provided.
Additional context
First discussed on May 21, 2024 in the SIG meeting.
Don't forget to provide recommendations for existing connections that may not be affected by the new netpol.