-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
peering: generate new token only on user-triggered events (#1399)
Previously, we will call generate token endpoint when secret contents change, i.e. when the resource version in the status of the Acceptor CR doesn't match the resouce version in the existing secret version. However, this results in a race condition when multiple reconciles run concurrently. When that happens, one of them ends up with an outdated CR object and as a result decides that it needs to re-generate the peering token because those resource versions don't match. This is also undesirable because now peering tokens have an establishment secret that can only be used one time. If we re-generate tokens without user knowing, this could result in errors because the dialer will use an outdated secret. Also, make sure we always update the latest version of the acceptor object by re-fetching it before updating.
- Loading branch information
Showing
9 changed files
with
162 additions
and
185 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.