Unidirectional Topic Operator
The nine topics of the event catalog as KafkaTopic resources on a Kafka cluster with auto-creation off, with the Topic Operator's reconciliation of drift, deletion, unmanaged topics and topics created outside Kubernetes checked against the cluster.
examples/29-unidirectional-topic-operator/ is a manifest overlay on the shared minikube setup in examples/_k8s: the Kafka cluster with the Topic Operator switched on and auto-creation off, nine KafkaTopic resources, and the order-service and notification-service. It accompanies Unidirectional Topic Operator.
It uses kustomize through kubectl, Strimzi, Kafka, CloudNativePG, the LGTM image and the unchanged order-service and notification-service images.
cd examples/29-unidirectional-topic-operator
./verify.sh
What to observe
- A set equal to the catalog. The
KafkaTopicnames are the nine ofTopics.ALL, all Ready, and Kafka holds the partitions and retention they declare. - No topic from a typo. A producer sending to an undeclared name is refused and no topic appears.
- One direction. An altered retention is reverted, a deleted topic is recreated, raised partitions are reported as
NotSupported, and a topic created in Kafka gets no resource. - Deletion. Deleting a
KafkaTopicdeletes the topic; unmanaging it first leaves the topic in Kafka.
Infrastructure
The cluster, PostgreSQL and LGTM bases of examples/_k8s, one patch to the Kafka resource, and the order-service and notification-service deployments.