Merge pull request #32719 from liggitt/namespace-admission-wait
Automatic merge from submit-queue
compensate for raft/cache delay in namespace admission
When attempting to create an object in a just-created namespace, the admission plugin can reject the creation attempt for two reasons:
1. The cache of existing namespaces has not observed the creation watch event yet. There was already compensation to perform a live lookup if the namespace was not found in the cache.
2. The live lookup can be performed against a non-leader in a HA etcd setup, and can return NotFound if the non-leader etcd has not observed the creation.
This PR adds a delay, then rechecks the cache before proceeding with the live lookup. This gives both the cache and the backing storage more time to observe the create, before failing the request.
Showing
Please
register
or
sign in
to comment