KafkaTopic
Expand a field to see its description, example, and default behavior. Nested fields are grouped under their parent.
Required fields must be present when their parent object exists. [] denotes an array item; {key} denotes a map value. status is written by the operator. Reconcile-time checks and runtime defaults can add requirements beyond the schema.
Examples are illustrative JSON values. Open “View JSON example” for an object or array. Adapt names, endpoints, and credentials to your cluster. Kubernetes applies schema defaults when the containing object exists. Runtime and omission notes describe operator behavior. Status examples show reported data.
Runtime notes and domain examples were reviewed against operator source at b409b56.
View the complete CRD manifest at 618d621Example manifest
This example includes the required spec fields. Adapt its values and create any referenced resources before applying it.
apiVersion: krabka.io/v1alpha1
kind: KafkaTopic
metadata:
name: example
namespace: default
labels:
krabka.io/cluster: my-cluster
spec:
partitions: 3
replicas: 3
No fields match. Change the search or reset the filters.
krabka.io/v1alpha1
Complete OpenAPI schema (JSON)
{
"description": "Auto-generated derived type for KafkaTopicSpec via `CustomResource`",
"properties": {
"spec": {
"properties": {
"config": {
"additionalProperties": {
"type": "string"
},
"description": "Opaque topic-level config, such as `retention.ms` and\n`cleanup.policy`. The operator reconciles it with an\n`IncrementalAlterConfigs` SET and DELETE diff against the cluster's\ncurrent dynamic-topic overrides.",
"nullable": true,
"type": "object"
},
"partitions": {
"description": "Number of partitions. The operator applies increases through\n`CreatePartitions`. The operator rejects decreases with\n`ImmutableFieldChanged`.",
"format": "int32",
"maximum": 1000000,
"minimum": 1,
"type": "integer"
},
"preserveTopic": {
"default": false,
"description": "When `true`, a CRD delete still removes the finalizer but skips the\n`DeleteTopics` call, so the Kafka topic survives. Default: `false`.",
"type": "boolean"
},
"replicas": {
"description": "Replication factor. The operator applies changes through Kafka\npartition reassignment and reports `Reassigning` until it completes.",
"format": "int32",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"topicName": {
"description": "Optional override for the Kafka topic name. Defaults to\n`metadata.name`. The operator validates it at reconcile time against\nKafka's rules: length ≤ 249, characters `[A-Za-z0-9._-]`, and not `.`\nor `..`.",
"nullable": true,
"type": "string"
}
},
"required": [
"partitions",
"replicas"
],
"type": "object"
},
"status": {
"nullable": true,
"properties": {
"conditions": {
"default": [],
"description": "Standard Kubernetes-style condition list. It shows `Ready`.",
"items": {
"properties": {
"lastTransitionTime": {
"description": "RFC3339 timestamp.",
"type": "string"
},
"message": {
"description": "Human-readable message.",
"type": "string"
},
"reason": {
"description": "CamelCase machine reason.",
"type": "string"
},
"status": {
"description": "`True`, `False`, or `Unknown`.",
"type": "string"
},
"type": {
"description": "For example, `Ready`.",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"type": "array"
},
"observedGeneration": {
"description": "`metadata.generation` of the last successfully-reconciled spec. That\nis the last time the operator wrote `Ready=True reason=Ready`.",
"format": "int64",
"nullable": true,
"type": "integer"
},
"topicId": {
"description": "Cluster-assigned topic UUID. The operator fills it in once the topic\nexists.",
"nullable": true,
"type": "string"
},
"topicName": {
"description": "Effective topic name. The operator supplies a default if\n`spec.topicName` is unset.",
"nullable": true,
"type": "string"
}
},
"type": "object"
}
},
"required": [
"spec"
],
"title": "KafkaTopic",
"type": "object"
}
spec
spec
object
Required
5 fields
- Example
-
View JSON example
{ "partitions": 3, "replicas": 3 } - Default No schema default
- Not declared
config
object | null
Optional
1 field
Opaque topic-level config, such as retention.ms and cleanup.policy. The operator reconciles it with an IncrementalAlterConfigs SET and DELETE diff against the cluster's current dynamic-topic overrides.
- Example
-
View JSON example
{ "retention.ms": "604800000", "cleanup.policy": "delete" } - Default No schema default
- Not declared
Validation and schema details
- Additional properties
{ "type": "string" }
{key}
string
Map value
- Example
-
"604800000" - Default No independent default
- Defined by the parent
partitions
integer (int32)
Required
Number of partitions. The operator applies increases through CreatePartitions. The operator rejects decreases with ImmutableFieldChanged.
- Example
-
3 - Default No schema default
- Not declared
Validation and schema details
- Maximum
1000000
- Minimum
1
preserveTopic
boolean
Optional
When true, a CRD delete still removes the finalizer but skips the DeleteTopics call, so the Kafka topic survives. Default: false.
- Example
-
false - Default Schema default
false
replicas
integer (int32)
Required
Replication factor. The operator applies changes through Kafka partition reassignment and reports Reassigning until it completes.
- Example
-
3 - Default No schema default
- Not declared
Validation and schema details
- Maximum
1000
- Minimum
1
topicName
string | null
Optional
Optional override for the Kafka topic name. Defaults to metadata.name. The operator validates it at reconcile time against Kafka's rules: length ≤ 249, characters [A-Za-z0-9._-], and not . or ...
- Example
-
"orders" - Default Runtime / omission
metadata.name when omitted.
status
status
object | null
Optional
4 fields
- Example
-
View JSON example
{ "conditions": [ { "lastTransitionTime": "2026-10-05T12:00:00Z", "message": "The resource is ready.", "reason": "Reconciled", "status": "True", "type": "Ready" } ] } - Default No schema default
- Not declared
conditions
array
Optional
1 field
Standard Kubernetes-style condition list. It shows Ready.
- Example
-
View JSON example
[ { "lastTransitionTime": "2026-10-05T12:00:00Z", "message": "The resource is ready.", "reason": "Reconciled", "status": "True", "type": "Ready" } ] - Default Schema default
[]
[]
object
Array item
5 fields
- Example
-
View JSON example
{ "lastTransitionTime": "2026-10-05T12:00:00Z", "message": "The resource is ready.", "reason": "Reconciled", "status": "True", "type": "Ready" } - Default No schema default
- Not declared
lastTransitionTime
string
Required
RFC3339 timestamp.
- Example
-
"2026-10-05T12:00:00Z" - Default No schema default
- Not declared
message
string
Required
Human-readable message.
- Example
-
"The resource is ready." - Default No schema default
- Not declared
reason
string
Required
CamelCase machine reason.
- Example
-
"Reconciled" - Default No schema default
- Not declared
status
string
Required
True, False, or Unknown.
- Example
-
"True" - Default No schema default
- Not declared
type
string
Required
For example, Ready.
- Example
-
"Ready" - Default No schema default
- Not declared
observedGeneration
integer | null (int64)
Optional
metadata.generation of the last successfully-reconciled spec. That is the last time the operator wrote Ready=True reason=Ready.
- Example
-
1 - Default No schema default
- Not declared
topicId
string | null
Optional
Cluster-assigned topic UUID. The operator fills it in once the topic exists.
- Example
-
"019bbdb3-fec4-7780-9978-8805004f5d96" - Default No schema default
- Not declared
topicName
string | null
Optional
Effective topic name. The operator supplies a default if spec.topicName is unset.
- Example
-
"orders" - Default No schema default
- Not declared
Resource schema
Resource schema
object
Resource schema
Auto-generated derived type for KafkaTopicSpec via CustomResource
- Example
-
View JSON example
{ "apiVersion": "krabka.io/v1alpha1", "kind": "KafkaTopic", "metadata": { "name": "example", "namespace": "default", "labels": { "krabka.io/cluster": "my-cluster" } }, "spec": { "partitions": 3, "replicas": 3 } } - Default No resource default
- None