<p>I would like to deploy <a href="https://www.keycloak.org/" rel="nofollow noreferrer">Keycloak</a> on my K8S cluster. In addition, the prerequisite for using Keycloack is a database, so I am going to use postgresql.  </p>

<p>Before deploying Keycloak, the database has to be up and running. For such as scenario, I think, I should use <a href="https://argoproj.github.io/docs/argo/readme.html" rel="nofollow noreferrer">Argo Workflow</a>.    </p>

<p>My question is, how to trigger the ArgoCD, after the database is up and running through the Argo Workflow? Or how to combine Argo Workflow with ArgoCD?     </p>

<p>This should be possible without using Argo Workflow to spin up a Postgres server. ArgoCD supports multiple ways to deploy a "package" of resources that includes both Keycloack and Postgres.</p>

<p>For example, you could use <a href="https://github.com/codecentric/helm-charts/tree/master/charts/keycloak#prerequisites-details" rel="nofollow noreferrer">Keybase's Helm chart</a> which optionally supports a Postgres component. </p>

<p>Then you can follow <a href="https://argoproj.github.io/argo-cd/user-guide/helm/" rel="nofollow noreferrer">ArgoCD's documentation on deploying Helm charts</a>.</p>

<p>While Argo Workflows <em>does</em> help manage sequential tasks, those tasks are usually ephemeral - they execute once and disappear. For a more persistent Postgres server, you want to make it part of your deployment rather than a one-off task.</p>
