Skip to content

Odyssey

This CRD contains information of database, username and yandex odyssey route.

Example

odyssey.yaml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
apiVersion: database.monitorsoft.ru/v1alpha5
kind: Odyssey
metadata:
  name: my-service
  namespace: default
spec:
  password: BefUf2xv
  maxConnections: 30
  extensions:
  - pgcrypto
  deletable: false
  templateDatabase: my-old-service
  existingDatabase:
    name: my-old-service
    user: my-old-service-username
    password: WpsKam3m
  enablePoolReservePreparedStatement: false
  pool: transaction
odysseyInstanceReferences:
- group: database.monitorsoft.ru
  kind: OdysseyInstance
  name: master
- group: database.monitorsoft.ru
  kind: OdysseyInstance
  name: replica
- group: database.monitorsoft.ru
  kind: OdysseyInstance
  name: sync-replica
postgresEndpointReference:
  group: database.monitorsoft.ru
  kind: PostgresEndpoint
  name: postgres-endpoint-default
  namespace: default

Required fields

  • .spec.maxConnections

Fields

password

Set password of user for connect to database. If this field is empty, will be generated random password and stored in .status.generatedPassword.

maxConnections

Set max connections for database and user. Details

extensions

List of extensions that will be created in database. If extension does not exist or the list contains duplicate extensions, an error occurs.

deletable

If set in true, the database and user will be deleted after the resource is deleted.

templateDatabase

Name of database set as database template.

After the database is created, a script will be executed to change the ownership of tables, sequences, views, functions, types, schemas and database.

existingDatabase

Credentials to connect to an existing database. Needed to use the same database by multiple applications.

enablePoolReservePreparedStatement

Enable yandex odyssey prepared statements feature. See yandex odyssey release notes for more information.

pool

Poll type. transaction or session. Details

odysseyInstanceReferences

This field contains references of odyssey instances. All fields are required.

postgresEndpointReference

This field contains references of postgres endpoint. All fields are required.

If field is empty, Melete will try to find the default PostgresEndpoint in the current namespace or in the cluster(if not found in current namespace) and set it.

Names generation

Odyssey:

  • Name: my-service
  • Namespace: default

Secret:

  • Name: my-service-odyssey

Database:

  • Name: default.my-service
  • User: default.my-service