Skip to content

KafkaSchema

Usage example

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

  project: my-aiven-project
  serviceName: my-kafka
  subjectName: mny-subject
  compatibilityLevel: BACKWARD
  schema: |
    {
        "doc": "example_doc",
        "fields": [{
            "default": 5,
            "doc": "field_doc",
            "name": "field_name",
            "namespace": "field_namespace",
            "type": "int"
        }],
        "name": "example_name",
        "namespace": "example_namespace",
        "type": "record"
    }

KafkaSchema

KafkaSchema is the Schema for the kafkaschemas API.

Required

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

spec

Appears on KafkaSchema.

KafkaSchemaSpec defines the desired state of KafkaSchema.

Required

  • project (string, Immutable, MaxLength: 63, Format: ^[a-zA-Z0-9_-]+$). Identifies the project this resource belongs to.
  • schema (string). Kafka Schema configuration should be a valid Avro Schema JSON format.
  • serviceName (string, Immutable, MaxLength: 63, Format: ^[a-z][-a-z0-9]+$). Specifies the name of the service that this resource belongs to.
  • subjectName (string, MaxLength: 63). Kafka Schema Subject name.

Optional

  • authSecretRef (object). Authentication reference to Aiven token in a secret. See below for nested schema.
  • compatibilityLevel (string, Enum: BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Kafka Schemas compatibility level.

authSecretRef

Appears on spec.

Authentication reference to Aiven token in a secret.

Required

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