Skip to content

ClickhouseDatabase

Usage example

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

  project: my-aiven-project
  serviceName: my-clickhouse
  databaseName: example-db

Info

To create this resource, a Secret containing Aiven token must be created first.

Apply the resource with:

kubectl apply -f example.yaml

Verify the newly created ClickhouseDatabase:

kubectl get clickhousedatabases my-db

The output is similar to the following:

Name     Database name    Service Name     Project             
my-db    example-db       my-clickhouse    my-aiven-project    

ClickhouseDatabase

ClickhouseDatabase is the Schema for the databases API.

Required

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

spec

Appears on ClickhouseDatabase.

ClickhouseDatabaseSpec defines the desired state of ClickhouseDatabase.

Required

  • project (string, Immutable, Pattern: ^[a-zA-Z0-9_-]+$, MaxLength: 63). Identifies the project this resource belongs to.
  • serviceName (string, Immutable, Pattern: ^[a-z][-a-z0-9]+$, MaxLength: 63). 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.
  • databaseName (string, Immutable, MaxLength: 63). Specifies the Clickhouse database name. Defaults to metadata.name if omitted.

Note

metadata.name is ASCII-only. For UTF-8 names, use spec.databaseName, but ASCII is advised for compatibility.

authSecretRef

Appears on spec.

Authentication reference to Aiven token in a secret.

Required

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