forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update managed namespace metadata (argoproj#13074)
* fix: update managed namespace metadata This commit fixes an issue where a namespace does not get updated unless a sync is performed. Since the `managedNamespaceMetadata` is not a part of the Application Git state, we need a way to force a sync once the metadata has changed. In order to do that, we need to add state to compare with. Once a sync is performed, the `ManagedNamespaceMetadata` gets copied to `SyncResult`, which will then be compared with on subsequent syncs. If there's a mismatch between `app.Spec.SyncPolicy.ManagedNamespaceMetadata` and `app.Status.OperationState.SyncResult.ManagedNamespaceMetadata` we mark the Application as `OutOfSync`. Fixes argoproj#12661. Signed-off-by: Blake Pettersson <[email protected]> * fix: nil check Signed-off-by: Blake Pettersson <[email protected]> * fix: allow empty apps to be updated If an app is empty but still differs in terms of `managedNamespaceMetadata`, it should still be kept up to date. Signed-off-by: Blake Pettersson <[email protected]> * test: add unit tests in appcontroller Signed-off-by: Blake Pettersson <[email protected]> * fix: rebase Signed-off-by: Blake Pettersson <[email protected]> * refactor: extract method Consolidate checks to `app.HasChangedManagedNamespaceMetadata()` Signed-off-by: Blake Pettersson <[email protected]> * chore: make codegen Signed-off-by: Blake Pettersson <[email protected]> --------- Signed-off-by: Blake Pettersson <[email protected]>
- Loading branch information
1 parent
f356a54
commit aed1be6
Showing
16 changed files
with
945 additions
and
632 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
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.