4

I would like to deploy Keycloak on my K8S cluster. In addition, the prerequisite for using Keycloack is a database, so I am going to use postgresql.

Before deploying Keycloak, the database has to be up and running. For such as scenario, I think, I should use Argo Workflow.

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?

softshipper
  • 32,463
  • 51
  • 192
  • 400
  • Couldn't you just use something like the Keycloak Helm chart, which allows you to optionally enable the DB for you? That would eliminate the need for a workflow to spin up the server and keep everything in ArgoCD. – crenshaw-dev May 13 '20 at 13:57
  • Could you please provide an example? How deploy multiple pod? – softshipper May 13 '20 at 14:29
  • So I'm not super familiar with ArgoCD, but I understand it can [deploy Helm charts](https://argoproj.github.io/argo-cd/user-guide/helm/), and there is a [Keybase Helm chart with a DB option](https://github.com/codecentric/helm-charts/tree/master/charts/keycloak#prerequisites-details). – crenshaw-dev May 13 '20 at 14:34

1 Answers1

4

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.

For example, you could use Keybase's Helm chart which optionally supports a Postgres component.

Then you can follow ArgoCD's documentation on deploying Helm charts.

While Argo Workflows does 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.

crenshaw-dev
  • 7,504
  • 3
  • 45
  • 81