Skip to main content
Version 3.0

One PostgreSQL
for the components' metadata.

Four scenarios: how the other charts access this PostgreSQL, the connection with the Hive Metastore, the connection with the other components, and the use of a PostgreSQL from another namespace. Each one covers: what changes, where each setting goes, and the verification.

ChartVersion3.0.3TypeapplicationAppVersion17.5.0
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+

The tdp-postgresql chart offers the other components an internal address and an admin password. The connection is configured in the chart of each component: it receives this address and the name of the password Secret, and a Job of its own chart creates the component's database and user in it.

Your environment

If you fill in your environment details here, the examples and commands on the page use what you provided. The namespace, the release name and the values file are your choices, not the chart's.

Scenarios​

The address, the admin password and what each component does with them.

The other components access PostgreSQL through the address of the Service, with the admin password of the postgres user, in the tdp-postgresql-auth Secret. Each component receives these two in its own values file. A Job of the component chart uses the admin password to create the component's database and user, and the component then uses that user.

By default, no component is connected: the internal Service and the admin Secret exist from the installation, and in this chart nothing changes except the connection limit.

The following tabs connect each component: the Hive Metastore in scenario 2, Airflow, Ranger, Superset, JupyterHub, OpenMetadata, CloudBeaver and Trino in scenario 3, and a component in another namespace in scenario 4.

Chart default

No component connected. The internal Service (ClusterIP) and the admin Secret exist from the installation.

What each component receives

The address <POSTGRESQL_SERVICE>.<NAMESPACE>.svc.cluster.local, on the service.port port, and the name of the tdp-postgresql-auth Secret, with the password in the postgres-password key.

Connection limit

Applies to all components of the instance together. Adjust it before connecting the Hive Metastore and the others, as in scenario 3 of PostgreSQL Configuration.

The components that can use this PostgreSQL

namespace <NAMESPACE>Hive MetastoreAirflowRangerSupersetJupyterHubOpenMetadataCloudBeaverTrinoService<POSTGRESQL_SERVICE>PostgreSQLone database per componentSecrettdp-postgresql-auth
  1. Hive Metastore. Address in postgres.external.host. Admin Secret in TDP-Settings.externalDatabase.externalSecret.releaseName. (tdp-hive-metastore.postgres.external.host)
  2. Airflow. Address in the database connection block in data. Admin Secret in TDP-Settings.externalDatabase.externalSecret.releaseName. (tdp-airflow.data)
  3. Ranger. Address in ranger.database.host. Admin Secret in TDP-Settings.externalDatabase.externalSecret.releaseName. (tdp-ranger.ranger.database.host)
  4. Superset. Address in supersetNode.connections.db_host. Admin Secret in TDP-Settings.externalDatabase.externalSecret.releaseName. (tdp-superset.supersetNode.connections.db_host)
  5. JupyterHub. Address in the hub.db.url URL. Admin Secret in TDP-Settings.externalDatabase.externalSecret.releaseName. (tdp-jupyter.hub.db.url)
  6. OpenMetadata. Address through the releaseName and the namespace (or host) of global.TDP-Settings.database.postgresql. Admin Secret in secretName, in the same block. (global.TDP-Settings.database.postgresql)
  7. CloudBeaver. Address in database.host. Admin Secret in database.postgresSecret.name. (tdp-cloudbeaver.database.postgresSecret.name)
  8. Trino. Queries the data of a database through the postgresql catalog, with the JDBC address and the user of that database. It does not use the admin Secret. (tdp-trino.catalogs)
  9. PostgreSQL address. <POSTGRESQL_SERVICE>.<NAMESPACE>.svc.cluster.local, on the service.port port. The Service name is <RELEASE_NAME>-tdp-postgresql, or just <RELEASE_NAME> when the release name already contains tdp-postgresql. (tdp-postgresql.service.port)
  10. PostgreSQL. Each connected component has its own database and its own user here, created by the database Job of its chart. The connection limit applies to all of them together. (tdp-postgresql.primary.extendedConfiguration)
  11. Admin password. The password of the postgres user, in the postgres-password key. The database Jobs of the components use it to create the database and the user of each one, and read it in the namespace of the component itself. Chart default: tdp-postgresql-auth, key postgres-password. (tdp-postgresql.auth.existingSecret)
The components that can use this PostgreSQL, on the left. Click each one to see where the setting goes.

Check the address and the Secret

The two values you will take to the component values file.

Terminal input
kubectl -n <NAMESPACE> get svc
kubectl -n <NAMESPACE> get secret tdp-postgresql-auth

It worked when

The <POSTGRESQL_SERVICE> Service appears as ClusterIP and the Secret exists. The Service name comes from the release: <RELEASE_NAME>-tdp-postgresql, or just <RELEASE_NAME> when the release name already contains tdp-postgresql.

Any other PostgreSQL client running in the cluster reaches the database through the same address.

When something goes wrong​

Troubleshooting

Paste the error message or pick the symptom. The answer comes with the cause, what to do and the command.

  1. The component cannot find the admin Secret. Cause: The database Job of the component reads the tdp-postgresql-auth Secret in the component own namespace, and it does not exist there: PostgreSQL is in another namespace or has not been installed yet. What to do: Install PostgreSQL before the component or copy the Secret to the component namespace (scenario 4).
  2. Component Job fails with connection refused. Cause: Wrong Service name or namespace in the address configured in the component. What to do: Check the name of the PostgreSQL Service and the namespace in the address (scenario 1).
  3. Connections exhausted with several components. Cause: The PostgreSQL connection limit does not accommodate the Hive Metastore and the other clients of the same instance. What to do: Raise max_connections before installing the components (PostgreSQL Configuration, scenario 3).

Next steps​