Skip to content

Database

Usage example

apiVersion: aiven.io/v1alpha1
kind: Database
metadata:
  name: my-db
spec:
  authSecretRef:
    name: aiven-token
    key: token

  project: aiven-project-name
  serviceName: my-service

  lcCtype: en_US.UTF-8
  lcCollate: en_US.UTF-8

Database

Database is the Schema for the databases API.

Required

  • apiVersion (string). Value aiven.io/v1alpha1.
  • kind (string). Value Database.
  • metadata (object). Data that identifies the object, including a name string and optional namespace.
  • spec (object). DatabaseSpec defines the desired state of Database. See below for nested schema.

spec

Appears on Database.

DatabaseSpec defines the desired state of Database.

Required

  • project (string, Immutable, MaxLength: 63, Format: ^[a-zA-Z0-9_-]+$). Identifies the project this resource belongs to.
  • serviceName (string, Immutable, MaxLength: 63, Format: ^[a-z][-a-z0-9]+$). Specifies the name of the service that this resource belongs to.

Optional

  • authSecretRef (object). Authentication reference to Aiven token in a secret. See below for nested schema.
  • lcCollate (string, Immutable, MaxLength: 128). Default string sort order (LC_COLLATE) of the database. Default value: en_US.UTF-8.
  • lcCtype (string, Immutable, MaxLength: 128). Default character classification (LC_CTYPE) of the database. Default value: en_US.UTF-8.
  • terminationProtection (boolean). It is a Kubernetes side deletion protections, which prevents the database from being deleted by Kubernetes. It is recommended to enable this for any production databases containing critical data.

authSecretRef

Appears on spec.

Authentication reference to Aiven token in a secret.

Required

  • key (string, MinLength: 1).
  • name (string, MinLength: 1).