Is your feature request related to a problem? Please describe.
In the context of the Kubernetes-native network enforcer that me and others are building, we would like to have a monitoring phase for the deployed network policy so the user can verify everything is right before switching to "enforce mode". Policy violations should be logged, but the traffic should still be allowed.
Describe the solution you'd like
From the investigation we conducted:
- use a custom annotation on the k8s network policy to mark the policy as in "monitor" mode. Not ideal but would avoid a new CRD.
- if the annotation is present kube-router could change the iptables rules to just log instead of dropping the traffic. This would mean that the notification in monitor mode would be collected through system logs
- if the annotation is not present the policy is enforced in the cluster.
Describe alternatives you've considered
At first we thought about a dedicated CRD for this, but maybe having just the annotation would be a better fit for the current architecture
Additional context
We already looked into this from a user standpoint: rancher-sandbox/network-enforcer#58
We would still love to hear feedback about anything of this.
Is your feature request related to a problem? Please describe.
In the context of the Kubernetes-native network enforcer that me and others are building, we would like to have a monitoring phase for the deployed network policy so the user can verify everything is right before switching to "enforce mode". Policy violations should be logged, but the traffic should still be allowed.
Describe the solution you'd like
From the investigation we conducted:
Describe alternatives you've considered
At first we thought about a dedicated CRD for this, but maybe having just the annotation would be a better fit for the current architecture
Additional context
We already looked into this from a user standpoint: rancher-sandbox/network-enforcer#58
We would still love to hear feedback about anything of this.