add synced resource version status#189
Merged
paul-the-alien[bot] merged 1 commit intomainfrom Jun 25, 2021
Merged
Conversation
6758a17 to
0663bcb
Compare
Member
|
Seems like a very nice solution to me! But I did not have the time to reproduce the bug of #169 to properly check everything yet. |
Member
|
/approve |
Member
|
/ok-to-test sha=0663bcb |
0663bcb to
5ac02ed
Compare
Member
Author
|
/ok-to-test sha=5ac02ed |
Member
Author
|
/merge |
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.
This fixes #169.
Adds a
SyncedResourceVersionto the Status field: it keeps track of the last synced external secret.It's a string and has the schema
{generation}-{meta-hash}. We can not rely solely on the metadata.generation, because it is not updated when object-meta changes. The hash is generated only from thelabelsandannotationsfields.We need this to:
A) prevent the controller from reconciling an already synced secret (within the refresh interval)
B) do not reconcile if only the status field was changed (to prevent controller recon loops on status updates)
Example:
Minor changes:
defertoupdatepatch the status field after the controller is done