<p>We have an ArgoCD project. In this project we have multiple apps (lets call them A, B, and C), which pass messages to each other via a Kafka cluster. In order to do this the topics need to be created.</p>
<p>App A is responsible for managing the Kafka cluster (amongst other things). We have a PreSync hook in app A for a job to create and configure the topics before updating the other resources, which apps B and C depend on.</p>
<p>This means that we need app A to sync before the other apps to ensure smooth rollout. To try to manage this we added app A to SyncWave <code>-1</code>, with others in the default <code>0</code></p>
<pre><code>kind: Application
metadata:
  name: &quot;A&quot;
  annotations:
    argocd.argoproj.io/sync-wave: &quot;-1&quot;
</code></pre>
<p>Our original assumption (perhaps foolishly) was that sync coordination applied <strong>within a project</strong>, however, it seems that it is only applied <strong>within an app</strong>.</p>
<p>So what happens is that the resources in app A wait for the PreSync hook to provision the topics as expected, but apps B and C do not wait for app A to be in sync.</p>
<p>Is there a way to control the order / dependencies of syncing between apps inside a project?</p>
<p>I have seen mention of an &quot;app-of-apps&quot; pattern, where you have one app which deploys all other apps. Would doing this allow us to leverage the SyncWave to ensure that app A fully resolves before attempting to sync apps B and C? If not, is there another way?</p>

nightowl
<p>As of version 1.8 of ArgoCD the part responsible for making this possible has been removed. More details can be found <a href="https://github.com/argoproj/argo-cd/issues/3781" rel="nofollow noreferrer">here</a> .</p>
<p>The argocd-cm will need to be updated to enable the app of an app health check using <strong>resource.customizations</strong> part like on below example. More details can be found <a href="https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/1.7-1.8/#health-assessement-of-argoprojioapplication-crd-has-been-removed" rel="nofollow noreferrer">here</a> and <a href="https://github.com/argoproj/argo-cd/issues/5585#issuecomment-869541606" rel="nofollow noreferrer">here</a>.</p>
<pre><code>---
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-cm
  namespace: argocd
  labels:
    app.kubernetes.io/name: argocd-cm
    app.kubernetes.io/part-of: argocd
data:
  resource.customizations: |
    argoproj.io/Application:
      health.lua: |
        hs = {}
        hs.status = &quot;Progressing&quot;
        hs.message = &quot;&quot;
        if obj.status ~= nil then
          if obj.status.health ~= nil then
            hs.status = obj.status.health.status
            if obj.status.health.message ~= nil then
              hs.message = obj.status.health.message
            end
          end
        end
        return hs
</code></pre>
