Prime global auto-mirror sources on startup#646
Open
komapa wants to merge 5 commits into
Open
Conversation
Remember unrestricted auto-mirror sources across reconnects and discover them once from the cluster so namespace events can reconcile before watch replay catches up.
|
Automatically marked as stale due to no recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Track all auto-mirror sources instead of only unrestricted ones during discovery and eager priming, and add a helper for identifying auto-mirror sources from mirroring properties.
Add tests that cover disabled and disallowed auto-mirror sources instead
Contributor
Author
|
@winromulus I promise this is the last PR from me for a while :) We have been running these latest fixes and we finally do not have issues with new namespaces needing configmap replication. I would love review from you if possible. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a cold start or resource watch reconnect,
_propertiesCacheand related caches are empty while the namespace watch keeps firing. NamespaceAdded/Modifiedhandlers iterate auto-mirror sources from in-memory state. If the source is not cached yet, reconciliation is skipped. This showed up as ConfigMaps missing in new namespaces for minutes while Secrets sometimes caught up sooner.This PR fixes a race where new or updated namespaces are reconciled before the ConfigMap/Secret watch has replayed auto-mirror sources into memory, so reflections (e.g.
default/env-global) are delayed until restart or watch rollover.Follow-up to #645.