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

[branch/v9] Improve CertAuthorityWatcher (#10403) #12724

Merged
merged 3 commits into from
May 24, 2022

Conversation

rosstimothy
Copy link
Contributor

Backport

This will backport the following commits from master to branch/v9:

Questions ?

Please refer to the Backport tool documentation

* Improve CertAuthorityWatcher

CertAuthorityWatcher and its usage are refactored to allow for
all the following:
 - eliminate retransmission of the same CAs
 - reduce memory usage by having one local watcher per proxy
 - adds the ability to filter only the CAs that are desired
 - reduce the time required to send the first CAs

watchCertAuthorities now compares all CAs it receives from the
watcher with the previous CA of the same type and only sends to
the remote site if they are not identical. This is to reduce
unnecessary network traffic which can be problematic for a
root cluster with a larger number of leafs.

The CertAuthorityWatcher is refactored to leverage a fanout
to emit events to any number of watchers, each subscription
can be for a subset of the configured CA types. The proxy
now has only one CertAuthorityWatcher that is passed around
similarly to the LockWatcher. This reduces the memory usage
for proxies, which prior to this has one local CAWatcher per
remote site.

updateCertAuthorities no longer waits on the utils.Retry it
is provided with before starting to watch CAs. By doing this
the proxy no longer has to wait ~8 minutes before it even
starts to watch CAs.

(cherry picked from commit 1ac0957)
@rosstimothy rosstimothy force-pushed the backport/branch/v9/pr-10403 branch from 8fe66db to 64b81d0 Compare May 18, 2022 12:35
@rosstimothy
Copy link
Contributor Author

friendly ping @jakule

@rosstimothy rosstimothy enabled auto-merge (squash) May 24, 2022 17:01
@rosstimothy rosstimothy merged commit 1099772 into branch/v9 May 24, 2022
@webvictim webvictim mentioned this pull request Jun 8, 2022
@rosstimothy rosstimothy deleted the backport/branch/v9/pr-10403 branch January 5, 2023 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants