Documentation

Automated Database Initialization

This documentation covers on-premise Sigrid. It is not applicable for cloud-based Sigrid.

Prerequisites

If you’re not pulling softwareimprovementgroup/sigrid-integration-onprem directly from our ECR, make sure to pull it from ECR and push it to your local registry for deployment.

Enabling Automated Database Initialization

This feature enables automated initialization of the Sigrid databases during deployment.

By default, the Helm chart includes the required SQL scripts but does not execute them automatically. In a standard on-premises setup, customers are expected to run these scripts manually using psql. The scripts are located in the sigrid-stack/files directory of the Helm chart and include sigriddb-init and sigridauthdb-init.

To automate this process, set global.onPremise.postgresInit to true in your Helm values. When enabled, the initialization job will execute the database setup as part of the deployment.

To use this feature, you must provide:

After successful initialization, the initialization job is no longer required and can be disabled again in the Helm values. When leaving the job enabled, it will skip the actual initialization upon subsequent helm install or helm upgrade commands as it detects the presence of the sigriddb database.

Below is an example configuration:

global:
  imageRegistry: "my-registry.example.com"
  imageTag: "1.0.20260309"
  hosts:
    - host: "my-sigrid.example.com"
      tls:
        enabled: true
        secretName: "my-tls-secret"
  onPremise:
    customer: "company"
    administrators:
      - "admin@company.com"
    postgresInit:
      enabled: true
      image:
        repository: "softwareimprovementgroup/sigrid-integrations-onprem"
        tag: "1.0.20260309"
      config:
        host: "my-postgres.example.com"
        sslMode: "verify-full"
        stopOnError: true  # disabling this can be useful during troubleshooting
      secrets:
        create: true
        secretName: "postgres-init-secret"
        data:
          PGPASSWORD: "" # Postgres root password
          DB_MGMT_USER_PASSWD: ""
          DB_MGMT_USER_PASSWD: ""
          IMPORT_USER_PASSWD: ""
          OSH_KB_UPDATER_PASSWD: ""
          LICENSES_USER_PASSWD: ""
          METRICS_USER_PASSWD: ""
          READONLY_USER_PASSWD: ""
          WEBAPP_USER_PASSWD: ""
          AUTH_DB_MGMT_USER_PASSWD: ""
          AUTH_DB_READONLY_USER_PASSWD: ""
          AUTH_DB_WEBAPP_USER_PASSWD: ""
      customCertificates:
        enabled: true
        certificates:
          create: true
          name: "postgres-init-custom-certs"
          data:
            postgres-ca.pem: |  # This should not be changed
              -----BEGIN CERTIFICATE-----
              .....
              -----END CERTIFICATE-----

Note: The certificate filename must exactly match postgres-ca.pem as shown in the example above. Changing this name will prevent the initialization job from loading the certificate correctly.

Contact and support

Feel free to contact SIG’s support team for any questions or issues you may have after reading this documentation or when using Sigrid.

On this page