From 5f62075734b8d7c68181f5ed05059cc954622b6d Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 10 Jul 2020 07:54:39 +0200 Subject: [PATCH 1/2] Zookeeper is being phased out so clients should use bootstrap servers However --if-not-exists isn't supported without zookeeper so we have to use the hack from github.com/solsson/dockerfiles/tree/native/native/cli-scripts --- kafka/test/produce-consume.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kafka/test/produce-consume.yml b/kafka/test/produce-consume.yml index 02cbad0e..88158bfa 100644 --- a/kafka/test/produce-consume.yml +++ b/kafka/test/produce-consume.yml @@ -57,11 +57,10 @@ spec: - name: topic-create image: solsson/kafka:native-cli@sha256:fbf29c59182fb87921c5199783d2d5796856ecbfe34a9c03eca658b3cf50f3c4 command: - - ./bin/kafka-topics.sh - - --zookeeper - - zookeeper.kafka.svc.cluster.local:2181 + - kafka-topics_ifnotexists + - --bootstrap-server + - bootstrap.kafka.svc.cluster.local:9092 - --create - - --if-not-exists - --topic - test-produce-consume resources: From b9c564ba9f54a437885e65ac71561c21e8265124 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 10 Jul 2020 07:57:34 +0200 Subject: [PATCH 2/2] Recommends that compression is specified, to avoid surprises --- kafka/test/produce-consume.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kafka/test/produce-consume.yml b/kafka/test/produce-consume.yml index 88158bfa..20824c19 100644 --- a/kafka/test/produce-consume.yml +++ b/kafka/test/produce-consume.yml @@ -63,6 +63,8 @@ spec: - --create - --topic - test-produce-consume + - --config + - compression.type=uncompressed resources: limits: cpu: 100m