-
Notifications
You must be signed in to change notification settings - Fork 3.4k
cleanup: untangle unnecessarily complex policy initialization #32813
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
Conversation
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.
nice - cilium/envoy
✔️
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.
ci-structure LGTM
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.
LGTM for clustermesh changes 👍
/test |
(Sorry for the delay.) |
/test |
We no longer allocate identities in the SelectorCache; stop plumbing it through. Signed-off-by: Casey Callendrello <cdc@isovalent.com>
This utility type doesn't belong in an implementation package. Signed-off-by: Casey Callendrello <cdc@isovalent.com>
The dependencies aren't actually as complicated as the code makes them out to be. We can construct them iteratively without mutation, now that we no longer need the cache to list reserved identities. This is a no-op change. Signed-off-by: Casey Callendrello <cdc@isovalent.com>
I commented it out but forgot to remove it in a prior PR. Signed-off-by: Casey Callendrello <cdc@isovalent.com>
ba45026
to
acd565e
Compare
/test |
1 similar comment
/test |
I have rebased with main branch to pick up the below CI fix. |
Update cilium to pick up cilium/cilium#32813. Ref: #2599 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Update cilium to pick up cilium/cilium#32813. Ref: #2599 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Update cilium to pick up cilium/cilium#32813. Ref: #2599 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
The
policy.NewPolicyRepository()
took a reference to an ID allocator, but it only used this to determine the initial set of identities. This funny little parameter created a circular reference that is tricky to untangle during initialization.We can remove this; the initial set of identities is well known and we don't need to create the allocator just to provide that parameter.
So, remove unnecessary parameters and un-circular-ize the policy cell initialization.