aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStaffan Olsson <staffan@repos.se>2017-11-07 20:12:06 +0100
committerStaffan Olsson <staffan@repos.se>2017-11-09 16:17:24 +0100
commit45494ffcf98bde8577d900144ab1fa2997fb33ed (patch)
treea7b8d0cc0329f19ffe28ecb2cce9b80c27d12f60
parent2257cd12c0fb8b4908382d565ea8e74dfce43c4d (diff)
downloadkubernetes-kafka-45494ffcf98bde8577d900144ab1fa2997fb33ed.tar.gz
kubernetes-kafka-45494ffcf98bde8577d900144ab1fa2997fb33ed.tar.bz2
kubernetes-kafka-45494ffcf98bde8577d900144ab1fa2997fb33ed.zip
Adds test that goes unready when there's not enough replicas of >0 topics
-rw-r--r--ops/test/replicated-partitions.yml46
1 files changed, 46 insertions, 0 deletions
diff --git a/ops/test/replicated-partitions.yml b/ops/test/replicated-partitions.yml
new file mode 100644
index 0000000..a2e46ba
--- /dev/null
+++ b/ops/test/replicated-partitions.yml
@@ -0,0 +1,46 @@
+apiVersion: apps/v1beta2
+kind: Deployment
+metadata:
+ name: replicated-partitions
+ namespace: test-kafka
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ test-type: readiness
+ test-target: under-replicated-partitions
+ template:
+ metadata:
+ labels:
+ test-type: readiness
+ test-target: under-replicated-partitions
+ spec:
+ containers:
+ - name: kafka
+ image: solsson/kafka:1.0.0@sha256:17fdf1637426f45c93c65826670542e36b9f3394ede1cb61885c6a4befa8f72d
+ ports:
+ - containerPort: 80
+ command:
+ - tail
+ - -f
+ - /dev/null
+ readinessProbe:
+ exec:
+ command:
+ - /bin/bash
+ - -c
+ - >
+ [
+ $(
+ ./bin/kafka-topics.sh
+ --zookeeper zookeeper.kafka:2181
+ --describe
+ --under-replicated-partitions
+ |
+ wc -l
+ )
+ -eq
+ 0
+ ]
+ periodSeconds: 30
+ timeoutSeconds: 29