What would happen if two applications try to sync the same resource(s)? #3532
-
Hey. I'm trying to migrate a config map from one application to another (the later would use a beta feature of multiple sources https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/). The goal is to avoid creating multiple apps which will just have a couple of config maps each and instead have a single app which syncs them all (but from deployment management perspective I'd like them to be generated separately and live in separate directories). However, I don't know how the apps would behave when they try to sync the same config map from the same location. Will they reference the same object in the cluster and be okay? Will one of them fail due to duplication? Will both of them fail? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Apparently there's a SharedResourceWarning issued, but the apps would keep taking turns syncing the resource. Once one app succeeds in syncing, another one marks the resource as out of sync and tries to sync it (I have auto sync and self heal enabled). Then it succeeds and the first app tries to sync again, and so on. The source of out of sync is the label |
Beta Was this translation helpful? Give feedback.
Apparently there's a SharedResourceWarning issued, but the apps would keep taking turns syncing the resource. Once one app succeeds in syncing, another one marks the resource as out of sync and tries to sync it (I have auto sync and self heal enabled). Then it succeeds and the first app tries to sync again, and so on. The source of out of sync is the label
app.kubernetes.io/instance
. The service that reads the resource seems to be fine, so looks like it's not a huge deal to introduce this duplication, though of course it's better to remove the resource from the second app once it's added to the first one.