-
Notifications
You must be signed in to change notification settings - Fork 50
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
Send networkpolicy data from operator to daemon #338
Conversation
def update_networkpolicy_per_endpoint(self, data): | ||
if len(data["old"]) > 0: | ||
self.delete_network_policy_ingress("no_except", data["old"]["ingress"]["cidr_table_no_except"]) | ||
self.delete_network_policy_ingress("with_except", data["old"]["ingress"]["cidr_table_with_except"]) |
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.
Cathy, let's discuss how we will combine these into batch. And shall we combine delete and update into batch.
@@ -364,3 +375,109 @@ def update_agent_substrate(self, ep, bouncer): | |||
|
|||
def delete_agent_substrate(self, ep, bouncer): | |||
self.rpc.delete_agent_substrate_ep(ep, bouncer.ip) | |||
|
|||
def update_networkpolicy_per_endpoint(self, data): |
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.
Any reason you dont want include this in mizar/obj/networkpolicy.py?
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.
To calculate bitmap value for network policies, there is quantity limitation for policy. So we decided to limit data scope to be within an endpoint. There could be 1000 policies in a cluster, but we expect less than 100 policies for a certain endpoint.
This function is to handle data for an endpoint. That's the reason putting the func here.
Approving for now to unblock the engineer. But we need revisit this and tracking this with issue #344 |
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.
Approving for now to unblock the engineer. But we need revisit this and tracking this with issue #344
No description provided.