-
Notifications
You must be signed in to change notification settings - Fork 388
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
🐛 admission/webhooks: properly cache webhooks and cleanup #3164
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
6fd6ff4
to
e092d25
Compare
managerLock sync.Mutex | ||
managersCache map[logicalcluster.Name]generic.Source | ||
lock sync.RWMutex | ||
cache map[logicalcluster.Name]map[logicalcluster.Name]clusterCache // by request and hook source cluster. |
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 you elaborate why we need sourceCluster and cluster logicalclusters in this cache?
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.
Its Source and Target? maybe name them this way if this the case
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.
because we have two informers giving us webhook configuration: locally in the workspace and from the APIExport workspace (cache server).
e092d25
to
2893133
Compare
a279f53
to
d27211a
Compare
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
d27211a
to
6493b39
Compare
/retest |
@sttts: The following tests failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Summary
The old code only added webhook sources, but never cleaned up. This PR bump kube to get CEL optimization for webhook filters, and it properly caches the webhook per cluster and cleans up on deletion.
Related issue(s)
Fixes #
Release Notes