Introduce HA PostgresQL DB for Keycloak (+ migration)

What does this MR do and why?

This MR treats the migration of the postgres db for keycloak to a HA version provided by the CNPG Operator introduced by !3305 (merged) .

This treats 2 scenarios: One for fresh installs , where creating a new cluster using components/keycloak-db under cnpg-clusters kustomization.

The second scenario applies to upgrades , using components/keycloak-upgrade-db under the same kustomization. The notable difference is that on the upgrade scenario, there will be an initdb created that will do a logical dump of the existing keycloak DB using the externalClusters directive to connect to it. Once the backup is done, it will move the data into the newly created postgres cluster.

Related reference(s)

Depends on: !3305 (merged)

Closes: #1279 (closed), #639 (closed)

Test coverage

CI configuration

CI pipelines perform an update for both management and workload clusters, this update will NOT perform a ClusterAPI rolling update (deletion and creation of new K8s nodes) by default.

For some cases, it may be relevant to perform more complex tests.

Theses features can be activated in an MR by adding one of these labels to the MR and will apply to the next pipelines.

  • adding the label ci-featuretest-rolling-update pipelines will perform a node rolling update in the -update jobs (without version upgrades)
  • adding the label ci-featuretest-upgrade-from-1.1.1 pipelines will perform an upgrade from Sylva 1.1.1 to your dev branch (including a k8s version upgrade resulting in a node rolling update)
Edited by Mihai Zaharia

Merge request reports

Loading