Skip to content
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

Merged
merged 1 commit into from
Jan 1, 2021
Merged

Send networkpolicy data from operator to daemon #338

merged 1 commit into from
Jan 1, 2021

Conversation

Hong-Chang
Copy link
Collaborator

No description provided.

@Hong-Chang Hong-Chang added this to the Release 0.7 milestone Dec 30, 2020
@Hong-Chang Hong-Chang self-assigned this Dec 30, 2020
@Hong-Chang Hong-Chang linked an issue Dec 30, 2020 that may be closed by this pull request
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"])
Copy link
Collaborator Author

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):
Copy link
Contributor

@clu2xlu clu2xlu Dec 31, 2020

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?

Copy link
Collaborator Author

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.

@clu2xlu
Copy link
Contributor

clu2xlu commented Jan 1, 2021

Approving for now to unblock the engineer. But we need revisit this and tracking this with issue #344

Copy link
Contributor

@clu2xlu clu2xlu left a 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

@clu2xlu clu2xlu merged commit 8104b3b into CentaurusInfra:dev-next Jan 1, 2021
@Hong-Chang Hong-Chang deleted the hc-networkpolicy-4 branch January 1, 2021 01:51
h-w-chen pushed a commit to h-w-chen/mizar that referenced this pull request Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send networkpolicy data from operator to daemon
2 participants