Skip to content

PostgresEndpoint

This CRD contains information about postgres cluster.

Example

postgres-endpoint.yaml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
apiVersion: database.monitorsoft.ru/v1alpha1
kind: PostgresEndpoint
metadata:
  name: postgres-endpoint
  namespace: default
spec:
  host: postgres.postgres.svc # Address of master postgres node
  port: 5432 # Port of master postgres node
  user: # Credentials
    name: melete
    password: 5MnPXu84
  defaultDatabase: melete # Database name for connection. .user.name will be used when is empty.
  replicas: # Additional replicas
  - name: replica
    host: postgres-replica.postgres.svc
    port: 5432
  - name: sync-replica
    host: postgres-sync-replica.postgres.svc
    port: 5432

Required fields

  • .spec.host
  • .spec.port
  • .spec.user.name
  • .spec.user.password

For more information about additional replicas see replicas, Odyssey Instance References, Postgres Endpoint Reference, Odyssey Secret, and OdysseyInstance .metadata.name.

Fields

host

Host to connect.

port

Port to connect.

user

Credentials to connect from Melete.

  • name - Username
  • password - Password

defaultDatabase

Name of the database to connect from Melete. By default, the value from user.name will be taken.

replicas

Array of additional connections to postgres cluster - replica, synchronous replica, replica with lag, etc...

Additional information can be found in Replicas.

  • name - Name of replica. Will be used for create/update OdysseyInstance.
  • host - Host to connect.
  • port - Port to connect.