-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NetworkPolicy
type and controller
#289
Conversation
8fed26b
to
4492775
Compare
4492775
to
363d219
Compare
bdbc2a6
to
796b8bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial thoughts after the first review:
- We need to review the details of the
NetworkPolicy
spec and sub types - Validation needs to be revisited for mandatory fields
This is just the first review. I need to do some end to end testing on my side first in order to give a conclusive feedback.
9b96879
to
11e6108
Compare
NetworkPolicy
controller with firewall rules enforcementNetworkPolicy
type and controller
// TargetNetworkInterface is the target of the network policy. | ||
type TargetNetworkInterface struct { | ||
// IP is the IP address of the target network interface. | ||
IP net.IP `json:"ip"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intended that we currently only support IPv4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we're supporting both and net.IP
supports both IPv4
and IPv6
right?
Direction: direction, | ||
Action: metalnetv1alpha1.FirewallRuleActionAccept, | ||
Priority: priority, | ||
IpFamily: corev1.IPv4Protocol, //TODO: later support for IPv6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we derive the IPFamily
from the ironcore-net
Rule
object instead of pinning it to IPv4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, derived IPFamily from Prefix.
16778ca
to
ec2a5c8
Compare
…ation Co-authored-by: Rohit Kumar <[email protected]>
…nt with tests Co-authored-by: Rohit Kumar <[email protected]>
ec2a5c8
to
3002635
Compare
NetworkPolicy
andNetworkPolicyRule
types, with code generationNetworkPolicy
controllerFirewallRules
enforcement inmetalnetNic
Fixes #275