Skip to main content
Version: Early Access

Using an External Database

This topic illustrates how to use an external database instead of the one that is provided with the operator itself.

This document describes how to change configuration on the existing Release installation. If you are doing initial installation, check the document Using an Existing PostgreSQL Database

Steps to Move to an External Database after Installation

  1. Migrate current Release data from the current database to external, for example:

    a. Backup current Release database, for details check Using an Existing PostgreSQL Database

    b. Restore the Release database to the target external database.

  2. Prepare the external database configuration, for example, like the following patch file:

spec:
external:
db:
enabled: true
main:
url: jdbc:postgresql://psql-test1-postgresql.default.svc.cluster.local:5432/main
username: postgres
password: admin123
report:
url: jdbc:postgresql://psql-test2-postgresql.default.svc.cluster.local:5432/report
username: postgres
password: admin123
postgresql:
install: false
  1. Update the database configuration in Release.
kubectl patch -n digitalai digitalaireleases.xlr.digital.ai dai-xlr \
--type=merge --patch-file external-db-patch.yaml
  1. The Release pods are automatically restarted.
  2. The CR yaml file will now have a new external.db section.
kubectl get Digitalaireleases dai-xlr -n digitalai -o yaml | yq '.spec.external.db'
  1. The restarted pod process will now use the new configuration. Check it with the following command:
kubectl exec -it sts/dai-xlr-digitalai-release -n digitalai \
-- cat /opt/xebialabs/xl-release-server/conf/xl-release.conf