monedula-gitops docs menu
KafkaTopic
Field reference for the KafkaTopic resource (gitops.monedula.dev/v1alpha1): every spec and status field with its type, default and validation rules.
Reference 19 of 20
Reference for monedula-gitops v1.0.0
Updated 9 October 2026
On this page
Summary
| apiVersion | gitops.monedula.dev/v1alpha1 |
| kind | KafkaTopic |
| Scope | Namespaced |
kubectl get columns | Cluster, Phase, Age |
KafkaTopicSpec carries CEL transition rules (x-kubernetes-validations) that enforce identity immutability AT THE APISERVER, so the default install (webhooks disabled) cannot silently orphan broker state by renaming identity fields. The rules reference oldSelf, so they run only on UPDATE - create is unrestricted. topicName is immutable ONCE SET: an update from unset/empty to set is allowed (defaulting resolves topicName from metadata.name in-memory, so making the default explicit later must not be rejected). Note the CEL rule cannot compare against metadata.name from spec scope, so unset→set admits any value; the webhook (when enabled) additionally rejects an unset→set update whose value differs from metadata.name (resolved-name comparison). The !has() disjunct is defensive for a future pointer/optional refactor of TopicName; today the field is a plain string, so the .size() == 0 disjunct is what fires for never-set values. CEL messages are static (no old/new value interpolation) - the webhook supplies the richer old -> new messages.
Rules enforced by the API server:
- spec.topicName is immutable once set (a rename is a delete + create of a different Kafka topic)
- spec.clusterRef.name is immutable (repointing a topic orphans state on the previous cluster)
Example
apiVersion: gitops.monedula.dev/v1alpha1
kind: KafkaTopic
metadata:
name: sample-topic
namespace: monedula-system
spec:
clusterRef:
name: sample-cluster
topicName: orders.events
partitions: 6
replicationFactor: 3
config:
retention.ms: "604800000"
cleanup.policy: delete
access:
producers:
- principal: User:orders-service
operations:
- Write
consumers:
- principal: User:billing-service
group: billing-consumers
topicOperations:
- Read
groupOperations:
- Read
reconciliation:
mode: Enforce
deletionPolicy: Orphan Spec
spec.access object spec.access.consumers array<object> spec.access.consumers[].group string required spec.access.consumers[].groupOperations array<string> spec.access.consumers[].host string Host restricts the topic+group ACLs to a source host (default "*" = all hosts).
spec.access.consumers[].principal string required spec.access.consumers[].topicOperations array<string> spec.access.producers array<object> spec.access.producers[].host string Host restricts the ACL to a source host (default "*" = all hosts).
spec.access.producers[].operations array<string> spec.access.producers[].principal string required spec.clusterRef object required spec.clusterRef.name string required spec.config map<string, string> spec.deletionPolicy string One of: Orphan, Delete
spec.drift object spec.drift.ignoreFields array<string> spec.partitions integer required min: 1
spec.prune boolean Prune opts this resource's managed ACL scope into pruning: in-scope live ACLs no longer desired are deleted only when every resource whose scope covers them sets prune: true. Default false - prune candidates are reported as drift but never deleted.
spec.reconciliation object spec.reconciliation.mode string One of: Enforce, DetectOnly, ObserveOnly
spec.replicationFactor integer min: 1
spec.schema object spec.schema.compatibility string One of: NONE, BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE
spec.schema.format string required One of: AVRO, JSON, PROTOBUF
spec.schema.keySchema object spec.schema.keySchema.valueFrom object required spec.schema.keySchema.valueFrom.configMapKeyRef object ConfigMapKeyRef reads a ConfigMap key (operator mode only). Uses the same {Name, Key} shape as SecretKeyRef; no Secret is involved.
spec.schema.keySchema.valueFrom.configMapKeyRef.key string required spec.schema.keySchema.valueFrom.configMapKeyRef.name string required spec.schema.keySchema.valueFrom.env string spec.schema.keySchema.valueFrom.file string spec.schema.keySchema.valueFrom.inline string Inline is the literal value verbatim (intended for schema bodies).
spec.schema.keySchema.valueFrom.secretKeyRef object spec.schema.keySchema.valueFrom.secretKeyRef.key string required spec.schema.keySchema.valueFrom.secretKeyRef.name string required spec.schema.keySubject string KeySubject names the key schema subject verbatim when SubjectStrategy is Custom.
spec.schema.subjectStrategy string One of: TopicName, RecordName, TopicRecordName, Custom
spec.schema.valueSchema object spec.schema.valueSchema.valueFrom object required spec.schema.valueSchema.valueFrom.configMapKeyRef object ConfigMapKeyRef reads a ConfigMap key (operator mode only). Uses the same {Name, Key} shape as SecretKeyRef; no Secret is involved.
spec.schema.valueSchema.valueFrom.configMapKeyRef.key string required spec.schema.valueSchema.valueFrom.configMapKeyRef.name string required spec.schema.valueSchema.valueFrom.env string spec.schema.valueSchema.valueFrom.file string spec.schema.valueSchema.valueFrom.inline string Inline is the literal value verbatim (intended for schema bodies).
spec.schema.valueSchema.valueFrom.secretKeyRef object spec.schema.valueSchema.valueFrom.secretKeyRef.key string required spec.schema.valueSchema.valueFrom.secretKeyRef.name string required spec.schema.valueSubject string ValueSubject names the value schema subject verbatim when SubjectStrategy is Custom.
spec.topicName string Status
Written by the operator; read-only for users.
status.conditions array<object> status.conditions[].lastTransitionTime string required lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
status.conditions[].message string required message is a human readable message indicating details about the transition. This may be an empty string.
max length: 32768
status.conditions[].observedGeneration integer observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
format: int64, min: 0
status.conditions[].reason string required reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$, min length: 1, max length: 1024
status.conditions[].status string required status of the condition, one of True, False, Unknown.
One of: True, False, Unknown
status.conditions[].type string required type of condition in CamelCase or in foo.example.com/CamelCase.
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$, max length: 316
status.drift object status.drift.detected boolean required status.drift.fields array<string> status.lastAppliedTime string format: date-time
status.lastCheckedTime string format: date-time
status.observedAccess object status.observedAccess.consumers array<object> status.observedAccess.consumers[].group string required status.observedAccess.consumers[].groupOperations array<string> status.observedAccess.consumers[].host string Host restricts the topic+group ACLs to a source host (default "*" = all hosts).
status.observedAccess.consumers[].principal string required status.observedAccess.consumers[].topicOperations array<string> status.observedAccess.producers array<object> status.observedAccess.producers[].host string Host restricts the ACL to a source host (default "*" = all hosts).
status.observedAccess.producers[].operations array<string> status.observedAccess.producers[].principal string required status.observedGeneration integer format: int64
status.observedTopic object status.observedTopic.config map<string, string> status.observedTopic.partitions integer status.observedTopic.replicationFactor integer status.observedTopic.topicName string status.phase string status.schema object status.schema.compatibility string status.schema.valueSchemaId integer status.schema.valueSubject string