aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md9
-rw-r--r--test/11topic-create-test1.yml (renamed from test/10topic-create-test1.yml)0
-rw-r--r--test/12topic-create-test2.yml25
-rw-r--r--test/99testclient.yml2
-rw-r--r--test/test.sh12
-rw-r--r--zookeeper/zookeeper.yaml2
6 files changed, 48 insertions, 2 deletions
diff --git a/README.md b/README.md
index 6695ac7..e29a63b 100644
--- a/README.md
+++ b/README.md
@@ -66,3 +66,12 @@ This is WIP, but topic creation has been automated. Note that as a [Job](http://
```
kubectl create -f test/10topic-create-test1.yml
```
+
+## Cleanup
+
+Using a namespace you can simply delete it. PVs are outside namespaces so delete them too.
+```
+kubectl delete namespace kafka
+kubectl delete pv datadir-zoo-0 datadir-zoo-1 datadir-zoo-2
+kubectl delete pv datadir-kafka-0 datadir-kafka-1 datadir-kafka-2
+```
diff --git a/test/10topic-create-test1.yml b/test/11topic-create-test1.yml
index fdb805e..fdb805e 100644
--- a/test/10topic-create-test1.yml
+++ b/test/11topic-create-test1.yml
diff --git a/test/12topic-create-test2.yml b/test/12topic-create-test2.yml
new file mode 100644
index 0000000..45d9881
--- /dev/null
+++ b/test/12topic-create-test2.yml
@@ -0,0 +1,25 @@
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: topic-create-test2
+ namespace: kafka
+spec:
+ template:
+ metadata:
+ name: topic-create-test2
+ spec:
+ containers:
+ - name: kafka
+ image: solsson/kafka:0.10.0.1
+ command:
+ - ./bin/kafka-topics.sh
+ - --zookeeper
+ - zookeeper:2181
+ - --create
+ - --topic
+ - test2
+ - --partitions
+ - "1"
+ - --replication-factor
+ - "3"
+ restartPolicy: Never
diff --git a/test/99testclient.yml b/test/99testclient.yml
index 88ad6bb..6ed3cc8 100644
--- a/test/99testclient.yml
+++ b/test/99testclient.yml
@@ -1,5 +1,5 @@
# Kafka image without the service, so you can run ./bin/ stuff
-# kubectl exec -ti anythingclient -- /bin/bash
+# kubectl exec -ti testclient -- /bin/bash
apiVersion: v1
kind: Pod
metadata:
diff --git a/test/test.sh b/test/test.sh
index f81070b..ac3cc1c 100644
--- a/test/test.sh
+++ b/test/test.sh
@@ -11,3 +11,15 @@ echo "Test $(date)" | ./bin/kafka-console-producer.sh --broker-list kafka-0.brok
echo "Test $(date)" | ./bin/kafka-console-producer.sh --broker-list kafka-1.broker:9092,kafka-2.broker:9092 --topic test1
# "WARN Removing server from bootstrap.servers as DNS resolution failed: kafka-X.broker:9092"
echo "Test $(date)" | ./bin/kafka-console-producer.sh --broker-list kafka-0.broker:9092,kafka-1.broker:9092,kafka-2.broker:9092,kafka-X.broker:9092 --topic test1
+
+# Topic 2, replicated
+./bin/kafka-topics.sh --zookeeper zookeeper:2181 --describe --topic topic2
+
+./bin/kafka-verifiable-consumer.sh \
+ --broker-list=kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092 \
+ --topic=topic2 --group-id=A --verbose
+
+./bin/kafka-verifiable-producer.sh \
+ --broker-list=kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092 \
+ --value-prefix=1 --topic=test2 \
+ --acks=1 --throughput=1 --max-messages=10
diff --git a/zookeeper/zookeeper.yaml b/zookeeper/zookeeper.yaml
index b7486d6..93944af 100644
--- a/zookeeper/zookeeper.yaml
+++ b/zookeeper/zookeeper.yaml
@@ -38,7 +38,7 @@ spec:
"name": "install",
"image": "gcr.io/google_containers/zookeeper-install:0.1",
"imagePullPolicy": "Always",
- "args": ["--version=3.5.2-alpha", "--install-into=/opt", "--work-dir=/work-dir"],
+ "args": ["--version=3.4.9", "--install-into=/opt", "--work-dir=/work-dir"],
"volumeMounts": [
{
"name": "opt",